Repository navigation
Conversation
Contributor
Test ReportTest Results
Code Coverage (Java 25)
Changed Class Coverage (2 classes)
|
Contributor
|
I think this is similar / dup of #4542 |
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.
input Filter { and: [Filter!] or: [Filter!] not: Filter eq: String },Query.f(filter: Filter): Int,$f={and: [{eq: "x"} x 100,000]}(~1.1 MB of variables), JDK 25:getArgumentValuescallsvalidateOneOfInputTypesfor every argument of every field invocation, and for a variable reference it walks the whole coerced variable value: every input object field and, since #4494 (mine), every list element. variable values are already coerced and checked once per request incoerceVariableValues, so each field that references the variable repeats the full walk. the cost is variable size times field invocations, which makes it a request amplification any client that can send variables can trigger, and the schema does not need a@oneOftype, only a list or input object argument. coercion itself also ran the recursive walk at every nested input object, so a value nested 120 deep was walked once per ancestor (50,000 leaves: 122 ms before, 11 ms after).validateOneOfInputTypesnow returns for variable references,coerceVariableValueschecks variable default values the way it already checked supplied ones, and external values are checked once after coercion instead of at every level. one visible change: an invalid default likequery ($v: [OneOf] = [{a: null}])is now rejected during variable coercion, the same as a supplied[{"a": null}], instead of as a field error. thegetArgumentValuesrows that fed hand-built invalidCoercedVariables(a state coercion no longer lets through) moved to acoerceVariableValuestest with the same values and exceptions. the new default value test and the@Timeout(10)end to end test fail before the change.