update SDL generation logic to work with applied directives #231
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.
FederationSdlPrinter
is a copy of agraphql.schema.idl.SchemaPrinter
fromgraphql-java
v17 with some custom filtering logic that was required for Federation v1.graphql-java
v18 introduced concept of applied directive to make a distinction from the directive definition (previously sameGraphQLDirective
type was used for both). This PR drops our custom copy of the schema printer and instead updates our logic to rely on the built-in schema printer provided by thegraphql-java
. Using custom predicates for filtering directives and schema elements we can replicate our custom functionality without the need of a custom printer.Related: