Repository navigation
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.
Fixed validation, planning and execution time growing quadratically and exponentially #640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: parser-dos-fixes
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Fixed validation, planning and execution time growing quadratically and exponentially #640
Changes from 1 commit
7863e19ffc0633fbb55852703771c64acb4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…ially Planning a field under an interface or a union planned its selection set again for every possible type of every abstract field above it, so the work grew exponentially with the nesting: `{ node { child { … } } }` nested 30 deep under an interface with three implementations never finished. Several validation rules were quadratic or exponential in the size of the document as well. Planning: - The plan of a field's selection set is reused for the same field, return type and includer - The includer of a selection is built once for its directives and the includer of its parent, so that covariant implementations reuse the plans under them too - Fragments are looked up by name, and the fields of a selection set are collected and merged through an index by identifier Validation: - The field selection merging rule compares each pair of fields once, as graphql-js does, and stops after the error limit - The unused variable rule collects the variables of an operation in one iterative pass - The operation name uniqueness rule counts operations in one pass and ignores fragments - The fragment spread target rule and the incremental delivery rules look fragments up by name - The subscription root field rule follows only the fragments that validation inlines - `SelectionInfoContext.FragmentDefinitions` is replaced by `Fragments`, by name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.