Skip to content

Conversation

@dondonz
Copy link
Member

@dondonz dondonz commented Mar 18, 2024

Backport of PR #3526 and PR #3527 which enables introspection to be disabled

Note: version 20 takes us back to the stone age with Java 8


then:
oldIntrospectionQuery.replaceAll("\\s+", "") ==
newIntrospectionQuery.replaceAll("\\s+", "")
Copy link
Member Author

Choose a reason for hiding this comment

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

Cosmetic change here

@Deprecated // Deprecated since 2024-03-16
public class NoIntrospectionGraphqlFieldVisibility implements GraphqlFieldVisibility {

@Deprecated // Deprecated since 2024-03-16
Copy link
Member Author

Choose a reason for hiding this comment

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

Java 8 special: the deprecated annotation in Java 8 doesn't have the "since" argument


when:
ei = ExecutionInput.newExecutionInput(IntrospectionQuery.INTROSPECTION_QUERY)
.graphQLContext(["INTROSPECTION_DISABLED": false]).build()
Copy link
Member Author

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 is Java 9+ so I've stuck in the string as is. Groovy wants the string rather than a ref to the string as the map key.

@dondonz dondonz changed the title 20.x Backport of PR 3526 20.x Backport of PR 3526 and PR 3527 Mar 18, 2024
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
Member Author

Choose a reason for hiding this comment

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

This is different to master - in Java 8 there's no Map.of so I have to use this static block like a caveman

@dondonz dondonz merged commit b0127e4 into 20.x Mar 19, 2024
@dondonz dondonz added this to the 20.8 milestone Mar 19, 2024
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.

3 participants