This release is a generic reimplementation of @apollo/subgraph
that can be used with any graphql-js compatible subgraphs. Unless
otherwise noted, behavior is intended to stay compatible with the
previous implementation.
Changed
- Use
graphql-jsfunctionality over custom logic. All logic is now
re-implemented usinggraphql-jsfunctionality.@apollo/federation-internalsis no
longer a dependency. printSubgraphSchemanow prints the complete schema, federation
directives, types, and root fields included. NOTE: It is just a thin wrapper around
@graphql-tools/utils'sprintSchemaWithDirectives.
Removed
-
LegacySchemaModuleinput shape.buildSubgraphSchemano longer accepts
Apollo Server's old{ typeDefs, resolvers }object shape. Pass an array of
{ typeDefs, resolvers }modules (or a bareDocumentNode) instead:- buildSubgraphSchema({ typeDefs, resolvers }) + buildSubgraphSchema([{ typeDefs, resolvers }])