A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 26.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
Breaking Changes
-
Validation rules consolidated into single
OperationValidator— The 31 individual rule classes ingraphql.validation.rules.*,AbstractRule, andRulesVisitorhave been removed. The rule filtering predicate type changed fromPredicate<Class<?>>toPredicate<OperationValidationRule>(a new@PublicApienum). Code that filters rules by class reference must migrate to the enum. (#4228) -
DirectiveInfoclass removed — UseDirectives.isBuiltInDirective()andDirectives.BUILT_IN_DIRECTIVESinstead.GraphQLSchema.Builder.clearDirectives()has also been removed — all 7 built-in directives are now always present. Built-in directives now consistently appear first inschema.getDirectives(). (#4229) -
JSpecify nullability annotations — big wave 2 — ~50 classes annotated with
@NullMarkedand@Nullable. This may surface new warnings or errors in projects using NullAway or Kotlin. (#4184)
Performance
-
23-39% execution throughput improvement — Reduce allocations in
Async$Many(zero-copy list),ResultPath(lazytoString()), andGraphQLCodeRegistry(fast-path DataFetcher lookup avoiding throwawayFieldCoordinatesallocation). (#4252) -
14-40% faster validation — Single
OperationValidatoreliminates per-rule visitor overhead and reduces collection allocations on hot paths. (#4228)
New Features
- feat:
GraphQLSchema.FastBuilderfor high-performance schema construction by @rstata in #4197 - Add OneOf inhabitability validation by @jbellenger in #4248
- Call
onExceptionHandledinChainedInstrumentationby @tinnou in #4207 - New
transformSchemaWithDeletesmethod for complex deletion cases in #4209
Bug Fixes
- Fix
ExecutableNormalizedFieldto respectGraphqlFieldVisibilityby @Samjin in #4204 - Fix type collecting for indirect references in #4213
- Fix and improve field visibility in #4212
- Code-built schemas now perform deprecated non-null field validations (same as SDL-built) in #4194
- Remove incorrect
@NullablefromGraphQLSchema.getCodeRegistry()in #4247
Other Improvements
- AST directives holder has a
toString()in #4195 - Add documentation and test for
additionalTypesinGraphQLSchemain #4208 - Build and test using Java 25 by @yeikel in #4173
- Update Objenesis, Spock and Groovy by @m1ngyuan in #4240
- Bump Gradle wrapper to 9.3.1, Shadow to 9.3.1, Kotlin to 2.3.0
New Contributors
- @jbellenger made their first contribution in #4248
- @rstata made their first contribution in #4197
- @Samjin made their first contribution in #4204
- @m1ngyuan made their first contribution in #4240
- @yeikel made their first contribution in #4173
Full Changelog: v26.0.beta-1...v26.0.beta-2