-
Notifications
You must be signed in to change notification settings - Fork 65
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
graphql-java-support: Bump graphql-java to v14 #51
Conversation
...l-java-support/src/main/java/com/apollographql/federation/graphqljava/SchemaTransformer.java
Outdated
Show resolved
Hide resolved
Is it worth adding a test to ensure that the |
@mcohen75 |
287870a
to
7594c82
Compare
graphql-java-support/src/test/java/com/apollographql/federation/graphqljava/SchemaUtils.java
Outdated
Show resolved
Hide resolved
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.
Thank you for the detailed PR description! I think we should try to use this ourselves in our own federated service before merging this, but I'll take a look at the FederationSdlPrinter
changes more thoroughly now. Everything else looks 👍
315f17a
to
a910096
Compare
95c77af
to
4e80998
Compare
4e80998
to
c00e151
Compare
2c50ade
to
467c19f
Compare
c00e151
to
47f0b0a
Compare
467c19f
to
1ac5a36
Compare
47f0b0a
to
10ada93
Compare
…maGeneratorPostProcessings()
10ada93
to
3a0c369
Compare
This PR is an iteration of the changes suggested in #41 and #46 (many thanks to the authors and commenters).
Summary of changes:
graphql-java
to V14 inpom.xml
GraphQLType::getName()
toGraphQLNamedType::getName()
graphql-java
changed their type hierarchySchemaPrinter.Options.includeSchemaDefintion()
toincludeSchemaDefinition()
graphql-java
fixed a typo in the word "definition"RuntimeWiring.getSchemaTransformers()
toRuntimeWiring.getSchemaGeneratorPostProcessings()
graphql-java
changed the getter name@deprecated
,@include
, and@skip
) from appearing in the SDLgraphql-java
now includes these definitions in the schema printer by default (due to Changes in schema directive printing AND the comment formats graphql-java/graphql-java#1609 ), which breaks gateway compositionFederationSdlPrinter
to usegraphql-java
v14'sSchemaPrinter
graphql-java
'sSchemaPrinter
forces us to maintain our own copy (FederationSdlPrinter
), but with the bugs fixed. As described in graphql-java-support: Remove federation directive and type definitions from SDL and use stricter SchemaGenerator checks #53 , we also use our own printer to avoid printing federation directive definitions and federation type definitions in SDL.Note this is a backwards-incompatible change.
Also note thatWe've added directive definition filtering in #53 , so we don't need to rely onFederationSdlPrinter.Options.includeDirectives()
will filter all directive definitions and usages indicated with the exception of directive usages of@deprecated
, which is conveniently the behavior we want.FederationSdlPrinter.Options.includeDirectives()
to filter the standard directive definitions.It'll be easier in this PR to go commit-by-commit. For
FederationSdlPrinter
, it'll help to compareFederationSdlPrinter.java
in the class-copy-and-rename commit to the v14SchemaPrinter
, located at https://raw.githubusercontent.com/graphql-java/graphql-java/v14.0/src/main/java/graphql/schema/idl/SchemaPrinter.java . For theFederationSdlPrinter
changes that fix the issues in #52 and #53 , it'll help to compare against the respective changes in those PRs.