Repository navigation
Conversation
…cument # Conflicts: # src/main/java/graphql/execution/directives/QueryDirectives.java # src/test/groovy/graphql/execution/directives/QueryDirectivesIntegrationTest.groovy
Contributor
Test ReportTest Results
Code Coverage (Java 25)
Changed Class Coverage (78 classes)
ImmutableKit — method details
InlineFragment.Builder — method details
ListType — method details
NonNullType — method details
NormalizedInputValue — method details
FpKit — method details
LinkedHashMapFactory — method details
TraverserVisitor — method details
TraverserVisitorStub — method details
TreeTransformer.1 — method details
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Build an immutable
NormalizedDocumentduring validation when explicitly enabled. It stores all operations, shared fragment references, source fields, symbolic conditions and type guards. Lookahead collects fields for the current execution and resolves arguments when requested.Creation is off by default. There is no lazy construction fallback. The preparsed entry retains the graph, including through serialization and execution-context copies.
Breaking changes and migration
NormalizedDocument.ENABLEDtotrueinExecutionInput'sGraphQLContextbefore validation. Retain complete preparsed entries and invalidate/repopulate existing AST-only caches; cache keys must distinguish schema/version and creation options.ExecutableNormalizedField,ExecutableNormalizedOperation,ExecutableNormalizedOperationFactory, the oldgraphql.normalized.nfAPIs, andNormalizedDeferredExecution. UseParseAndValidateResult.getNormalizedDocument()/ExecutionContext.getNormalizedDocument()for the validated graph and selection sets for lookahead. Remove calls togetNormalizedQueryTree()and overrides ofExecutionStrategy.getNormalizedField().ExecutableNormalizedOperationToAstCompilerandVariablePredicatewithout replacement.IllegalStateExceptionwhen it exceedsQueryComplexityLimits.maxFieldOccurrences(default 100,000). Request settings override JVM defaults. Raise this threshold when needed, or useQueryComplexityLimits.NONEto disable the bound.Examples for a
Petinterface implemented byCatandDog:pet { name }: returnsCat.nameandDog.name, instead of one[Cat, Dog].nameentry.pet { ... on Cat { label: name } ... on Dog { label: nickname } }: two entries share result keylabel, with different field definitions.pet { ... on Cat { child { name } child { lives } } }: oneCat.childentry combines the two child contributions; its children are collected when inspected.The migration guide includes cache examples and details of paths, ordering, arguments, parents and conditional flags.
Bounded lookahead
The occurrence threshold separately bounds concrete field paths during lookahead. With
Nodeimplemented byAandB, both exposingnext: Nodeandvalue: String,{ node { next { next { value } } } }has 4 validation occurrences but 14 lookahead entries belownode(2 + 4 + 8). A limit of 13 accepts validation and rejects full lookahead.Immediate inspection counts only immediate entries. Full inspection, glob matching and result-key grouping count all descendant entries, including non-matches. Active duplicate selections merge per concrete parent type and response key. Cached child lists still count; exceeding the limit throws without returning a truncated result.
Validation
Tests cover exact enumeration boundaries, nested interfaces with exponentially many potential paths, wide child batches, cached retries, concurrent reads, request overrides and disabling the bound. They also cover conditional fragments, aliases, concrete types and defaults, concurrent cache reuse, serialization, multiple operations, disabled lookahead, a 1,501-fragment chain on a 1 MiB stack, and shared diamond fragments. The large fixture stores 5,687 fields without execution variables; its existing validation limits remain unchanged. Independent input-value and AST tests replace coverage previously supplied by the removed normalization suites. The coverage baseline changes only for ten unchanged utility classes whose incidental coverage came from those deleted suites (debug strings, builder helpers, collection helpers and traversal callbacks).
Local validation: the full Java 25 main suite (5,864 tests) and reactive-streams suite (190 tests) passed with only expected skips. Build checks, Javadoc and the per-class coverage gate passed, with no additional baseline changes. CI passed for Java 17, 21 and 25, including the per-class coverage gate, build checks, concurrency stress tests and Javadoc.