Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
dondonz merged 2 commits into19.xfrom19.x-backport-3526-disable-introspection
Mar 19, 2024

Conversation

@dondonz
Copy link
Member

@dondonzdondonz commentedMar 18, 2024
edited
Loading

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

returnerrorClassification;
}
};
}
Copy link
MemberAuthor

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

bbakerman reacted with thumbs up emoji
@Deprecated// (since = "2024-03-16")
publicclassNoIntrospectionGraphqlFieldVisibilityimplementsGraphqlFieldVisibility {

@Deprecated// (since = "2024-03-16")
Copy link
MemberAuthor

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.

Copy link
Member

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()
Copy link
MemberAuthor

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());
Copy link
MemberAuthor

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

@dondonzdondonz changed the titleBackport #3526 with minor adjustments for v1919.x Backport #3526Mar 18, 2024
ImmutableList<ExecutableNormalizedField>normalizedFields =coordinatesToENFs.get(coordinates);
if (normalizedFields.size() >allowSize) {
BadFaithIntrospectionErrorerror =newBadFaithIntrospectionError(coordinates.toString());
returnOptional.of(ExecutionResultImpl.newExecutionResult().addError(error).build());
Copy link
MemberAuthor

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);
}
Copy link
MemberAuthor

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

@dondonzdondonz changed the title19.x Backport #352619.x Backport #3526 and PR #3527Mar 18, 2024
Copy link
Member

@bbakermanbbakerman left a 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
Copy link
MemberAuthor

Nice one - will the max nodes go in here

I'll add it in a separate PR

@dondonzdondonz merged commit84d4e39 into19.xMar 19, 2024
@dondonzdondonz added this to the19.10 milestoneMar 19, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bbakermanbbakermanbbakerman approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

19.10

Development

Successfully merging this pull request may close these issues.

2 participants

@dondonz@bbakerman

[8]ページ先頭

©2009-2025 Movatter.jp