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

Federation: strip common directives from federate services schema #21

Open
paolochiodi opened this issue Jul 29, 2020 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@paolochiodi
Copy link

While working on mercurius-js/mercurius#227 and mercurius-js/mercurius#184 I have noticed that the fastify-gql implementation is lacking at least two features from Apollo server.

One of them is that apollo server strips common and type system directives definitions (i.e the definition of key directive) from federated services sdl before combining them.

As stated in their documentation this allows the federated service to provide the schema unchanged without needing to strip them out.

Documentation: https://www.apollographql.com/docs/apollo-server/federation/gateway/#type-system-directives
Apollo's code:
https://github.com/apollographql/apollo-server/blob/1c58ea3cbf6f5ead1afd5e81a1113a75441ead26/packages/apollo-federation/src/composition/composeAndValidate.ts#L16
https://github.com/apollographql/apollo-server/blob/main/packages/apollo-federation/src/composition/normalize.ts#L20
https://github.com/apollographql/apollo-server/blob/main/packages/apollo-federation/src/composition/normalize.ts#L270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants