-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gateway): Strip federation primitives during normalization (apol…
…lographql/apollo-server#4209) This commit makes references to "federation primitives". This is just a way of saying all of the additions to a schema that federation requires as listed in the spec. This commit removes all federation primitives during the normalization step of composition. This simplifies the lives of all non-ApolloServer federation implementors. buildFederatedSchema goes to some lengths to provide a limited subset of SDL in the { _service { sdl } } resolver. In its current form, composition expects this format. This subset is fairly easy to achieve in JavaScript land, but isn't necessarily simple in other, non-JS graphql reference implementations. This has been an outstanding pain point for an endless number of users and can be quite simply normalized away during this step. This enables implementors to return a service's complete SDL from the { _service { sdl } } resolver without any errors. For unmanaged users, the gateway will now normalize the federation primitives away. For managed users, our backend will allow a service:push to contain federation primitives which will be normalized away in the same fashion. Fixes apollographql/apollo-server#3334 Apollo-Orig-Commit-AS: apollographql/apollo-server@b739e21
- Loading branch information
1 parent
4b36905
commit 2040775
Showing
7 changed files
with
255 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
federation-js/src/composition/validate/preComposition/reservedFieldUsed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.