You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds support to decorate existing schemas with federation add-ons. While working on the implementation of federation in type-graphql (MichalLytek/type-graphql#369), I realized that it's sort of a pain and pointless to convert from GraphQLSchema to SDL and back and to SDL again as well as pluck out the GraphQL*Type resolvers when buildFederatedSchema should just be able to take in an already constructed schema and modify it.
The text was updated successfully, but these errors were encountered:
I will add that modifying an existing schema would really only be able to add the Federation type definitions. The Apollo function buildSubgraphSchema wouldn't have enough context to know what other resolvers you might want to add like __resolveReference. So really what you need to do is just add some directives to an existing schema. That can be done today with tools like graphql-tools merge.
This takes some existing SDL and adds merges it with the Federation spec. It will not be able to add resolvers for you but it is a way to "automatically" include the @link directives if you want or add @key to certain types
Just bringing it to the issues area to give it a few eye-balls, feel free to close if it's not wanted or correct.
apollographql/apollo-server#3013
This PR adds support to decorate existing schemas with federation add-ons. While working on the implementation of
federation
intype-graphql
(MichalLytek/type-graphql#369), I realized that it's sort of a pain and pointless to convert fromGraphQLSchema
to SDL and back and to SDL again as well as pluck out theGraphQL*Type
resolvers whenbuildFederatedSchema
should just be able to take in an already constructed schema and modify it.The text was updated successfully, but these errors were encountered: