- Notifications
You must be signed in to change notification settings - Fork1.2k
19.x Backport #3526 and PR #3527#3532
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| returnerrorClassification; | ||
| } | ||
| }; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I also backported this convenience method to make the backport easier - it's in v20 onwards
| @Deprecated// (since = "2024-03-16") | ||
| publicclassNoIntrospectionGraphqlFieldVisibilityimplementsGraphqlFieldVisibility { | ||
| @Deprecated// (since = "2024-03-16") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Java 8 special: since is not an argument for the Deprecated annotation, so it's a comment
This was added in Java 9. v21 uses Java 11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nice
| when: | ||
| ei=ExecutionInput.newExecutionInput(IntrospectionQuery.INTROSPECTION_QUERY) | ||
| .graphQLContext(["INTROSPECTION_DISABLED":false]).build() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Java 8 special: Map.of was introduced in Java 9, so using the Groovy way instead
| @NotNull | ||
| privatestaticOptional<ExecutionResult>mkDisabledError(MergedFieldschemaField) { | ||
| IntrospectionDisabledErrorerror =newIntrospectionDisabledError(schemaField.getSingleField().getSourceLocation()); | ||
| returnOptional.of(ExecutionResultImpl.newExecutionResult().addError(error).build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
v19 API difference: this builder method is moved in v20 onwards
| ImmutableList<ExecutableNormalizedField>normalizedFields =coordinatesToENFs.get(coordinates); | ||
| if (normalizedFields.size() >allowSize) { | ||
| BadFaithIntrospectionErrorerror =newBadFaithIntrospectionError(coordinates.toString()); | ||
| returnOptional.of(ExecutionResultImpl.newExecutionResult().addError(error).build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Slight difference to master: this builder has changed file location
For v19 it is insideExecutionResultImpl
| ALLOWED_FIELD_INSTANCES.put(coordinates("__Type","inputFields"),1); | ||
| ALLOWED_FIELD_INSTANCES.put(coordinates("__Type","interfaces"),1); | ||
| ALLOWED_FIELD_INSTANCES.put(coordinates("__Type","possibleTypes"),1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Java 8 alert: there is no Map.of until Java 9 so I am using a static block like a caveman
bbakerman left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice one - will the max nodes go in here
dondonz commentedMar 19, 2024
I'll add it in a separate PR |
Uh oh!
There was an error while loading.Please reload this page.
Backport of#3526 and PR#3527 - pulls in introspection disabling and Good Faith Introspection
Remember we're back in the stone age with Java 8, small adjustments for this