Skip to content

feat: adopt Sangria's overlapping fields algorithm - #4840

Open
yaacovCR wants to merge 6 commits into
graphql:17.x.xfrom
yaacovCR:sangria
Open

feat: adopt Sangria's overlapping fields algorithm#4840
yaacovCR wants to merge 6 commits into
graphql:17.x.xfrom
yaacovCR:sangria

Conversation

@yaacovCR

Copy link
Copy Markdown
Contributor

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:

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@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 yaacovCR added the PR: feature 🚀 requires increase of "minor" version number label Jul 20, 2026
@yaacovCR
yaacovCR force-pushed the sangria branch 7 times, most recently from 26742bc to 1133f4a Compare July 27, 2026 14:27
yaacovCR added 6 commits July 28, 2026 13:59
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature 🚀 requires increase of "minor" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant