-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): apply limits to recursive functions in validation (#748)
* chore(compiler): add a failing test for #742 * Add max depth to RecursionStack * Use the CycleError with path for directive and input object cycles * Reuse length of `RecursionGuard::seen` set as the current recursion depth * Add limit when recursively walking selection set * Add `ValidationOptions` structure to pass in recursion limit Possibly also a diagnostic limit in the future. Maybe there would be options that could differ between executable and schema validation, but not right now * Revert "Add `ValidationOptions` structure to pass in recursion limit" This reverts commit 7206c61. * Hardcode recursion limit * Add a passing fragment chain test; add directive chain tests; lower recursion limit * Test input objects * chglg * Add an error type for hitting recursion limit * Track max recursion depth in RecursionStack * Lower limits: 32 for directives and types, 100 for fragments and selections * update limit in chglg
- Loading branch information
1 parent
48e296a
commit 67f8f91
Showing
11 changed files
with
543 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.