graphql-java-tools icon indicating copy to clipboard operation
graphql-java-tools copied to clipboard

Support schema directives

Open dariuszkuc opened this issue 2 years ago • 2 comments

I want to suggest an idea and checked that ...

  • [X] ... to my best knowledge, my idea wouldn't break something for other users
  • [X] ... the documentation does not mention anything about my idea
  • [X] ... there are no open or closed issues that are related to my idea

Description

SchemaParser currently does not process schema definitions which can include directive information.

Use Cases

Apollo Federation v2 relies on a schema @link directive to link definitions from external specification to the local schema. Gateway requires this link information to determine whether Federation v2 features can be used or it has to fallback to the v1 logic.

extend schema @link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@key", "@shareable"])

See https://github.com/apollographql/apollo-federation-subgraph-compatibility/ for example federation integration.

dariuszkuc avatar Nov 03 '22 16:11 dariuszkuc