Skip to content

Commit

Permalink
update SDL generation logic to work with applied directives
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
dariuszkuc committed Jul 27, 2022
1 parent f19be18 commit 150c26a
Show file tree
Hide file tree
Showing 46 changed files with 1,154 additions and 1,992 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ max_line_length = 200
[*.kts]
indent_size = 4
max_line_length = 200

[*.graphql]
indent_size = 2

0 comments on commit 150c26a

Please sign in to comment.