graphql-java-support: Fix grammar violation in graphql-java's SchemaPrinter #52
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.
graphql-java
'sSchemaPrinter
outputs grammar-violating SDL, as described in graphql-java/graphql-java#1823 . This has affected users offederation-jvm
, as shown in #21 and #23 .It's been fixed upstream by graphql-java/graphql-java#1798 , but this hasn't been released yet. This PR introduces a hotfix until
graphql-java
releases their fix (and backports it tographql-java
v13).The gist is we copy
SchemaPrinter
fromgraphql-java
v13 asFederationSdlPrinter
, and backport the fixes from graphql-java/graphql-java#1798 . I've added a basic test toFederationTest
to check behavior for the relevant types in the backfix (objects, interfaces, enums, and input objects).For reviewing, it'll help to diff
FederationSdlPrinter
against the v13SchemaPrinter
, located at https://raw.githubusercontent.com/graphql-java/graphql-java/v13.0/src/main/java/graphql/schema/idl/SchemaPrinter.java , and compare the diff against the changes files at graphql-java/graphql-java#1798 .