feat: adopt Sangria's overlapping fields algorithm - #4840
Open
yaacovCR wants to merge 6 commits into
Open
Conversation
|
@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
yaacovCR
force-pushed
the
sangria
branch
7 times, most recently
from
July 27, 2026 14:27
26742bc to
1133f4a
Compare
Use lazy field-set graphs and separate response-shape and common-parent proofs. Continue checking descendants after parent conflicts and treat untyped parents as concrete-like. Documents using fragment arguments remain on the legacy path for now.
Bind fragment field sets to lexical variable scopes, compare fragment-spread arguments, and cache alpha-equivalent proofs. Use the new detector for documents with fragment arguments; the retained fallback is removed separately.
Order unchecked fragment graphs from source strongly connected components so shared descendants are reached with complete parent context. Skip standalone work for field sets already validated from operations.
Add a maxValidationWork option with a 100,000,000-unit default and account for overlapping-field graph, proof, comparison, conflict, and nested argument-value work. Batch charges before expensive collection processing.
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.
Replace the recursive pairwise validator with an indexed field-set graph algorithm adapted from Sangria. Preserve GraphQL.js error messages as closely as practical through representative conflict sampling, nested reasons, stable source ordering, and dedicated fragment-argument diagnostics.
Prior art/context: