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

Drop FederationSdlPrinter #216

Closed
dariuszkuc opened this issue Jun 17, 2022 · 1 comment · Fixed by #231
Closed

Drop FederationSdlPrinter #216

dariuszkuc opened this issue Jun 17, 2022 · 1 comment · Fixed by #231
Assignees

Comments

@dariuszkuc
Copy link
Member

dariuszkuc commented Jun 17, 2022

With the release of Federation 2 we no longer need custom schema printer. Custom printer was needed to preserve directive information applied on schema fields/types but remove the directive definitions.

We should remove custom FederationSdlPrinter once we stop supporting Federation v1.

@dariuszkuc
Copy link
Member Author

Before we can drop the custom printer, we need to wait for new release of graphql-java that contains the printer fix (graphql-java/graphql-java#2856).

@dariuszkuc dariuszkuc self-assigned this Jul 26, 2022
dariuszkuc added a commit to dariuszkuc/federation-jvm that referenced this issue Jul 27, 2022
`FederationSdlPrinter` is a copy of a `graphql.schema.idl.SchemaPrinter` from `graphql-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 same `GraphQLDirective` 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 the `graphql-java`. Using custom predicates for filtering directives and schema elements we can replicate our custom functionality without the need of a custom printer.

Related:

* resolves: apollographql#227
* resolves: apollographql#216
* supersedes: apollographql#223
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 a pull request may close this issue.

1 participant