Skip to content
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

Updating to v22 #95

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Updating to v22 #95

merged 2 commits into from
Apr 16, 2024

Conversation

bbakerman
Copy link
Member

This is a staging PR for when v22 of graphql-java is made available

@bbakerman bbakerman added this to the 22.0 milestone Apr 7, 2024
@@ -34,15 +36,23 @@ public ValidationSchemaWiring(ValidationRules ruleCandidates) {
public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> env) {
GraphQLFieldsContainer fieldsContainer = env.getFieldsContainer();
GraphQLFieldDefinition fieldDefinition = env.getFieldDefinition();

TargetedValidationRules rules = ruleCandidates.buildRulesFor(fieldDefinition, fieldsContainer);
if (rules.isEmpty()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should always have been present. Dont build a new DataFetcher unless there is rules for that field

I am not sure how this got missed

if (! (fieldsContainer instanceof GraphQLObjectType)) {
// only object type fields can have data fetchers
return fieldDefinition;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version of grpahql-java 22 does not allow setting a data fetcher on GraphQLFieldsContainer anymore since that's nonsensical for interfaces

@dondonz dondonz changed the title WIP - updating to v22 Updating to v22 Apr 16, 2024
@dondonz dondonz merged commit 8f7a581 into master Apr 16, 2024
1 check passed
@dondonz dondonz deleted the update-to-22 branch April 16, 2024 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants