How to compose a federated graph with WunderGraph Schema Composition, a TypeScript composition library.
DocumentNode
can be created using the graphql libary parse
function. A simple example subgraph is provided below :
federateSubgraphs
function returns a FederationResult
, which has the following form:
DocumentNode
representation of the federated graph. If federation was unsuccessful, this property will be undefined.
federatedGraphSchema: An optional graphql GraphQLSchema
representation of the federated graph. If federation was unsuccessful, this property will be undefined.
print
or graphql printSchema
.