graphql-gateway
Graphql Gateway is a lightweight tool for routing different parts of a graphql query to different graphql apis and merging them back into one.
Usage
See test for example, here are the basics:
const graphqlGateway = ;const combinedQuery = "query FooQuery {}" // the query that will be split up by schemaconst result = ;
See the documentation for the merge-resolver
npm module for the optionalMergeResolvers
.
Alternatives
This tool is really lightweight and useful when you control all the underlying APIs and don't need any join functionality. Some really cool alternatives have been popping up, and while I haven't done a full evaluation, I'd like to point them out.