GraphQL Mesh allows you to use GraphQL query language to access data in remote APIs that don't run GraphQL (and also ones that do run GraphQL). It can be used as a gateway to other services, or run as a local GraphQL schema that aggregates data from remote APIs.
The goal of GraphQL Mesh is to simplify access to your data-sources, and use GraphQL language to query it easily. You can link, merge, aggregate, transform, modify and link your data-sources, and later query it using GraphQL queries.
You can use one of the handlers that we wrote (GraphQL, Apollo Federation, gRPC, Swagger, OpenAPI, SOAP, Postgres and more), or write your own handler to access your data.
Note: GraphQL Mesh doesn’t aim to magically create your utopic public GraphQL schema - it’s just an easy-to-use proxy to your data, and you should consider implementing another layer that exposes your public data the way you need it to be.
How it works?
The way GraphQL Mesh works is:
- Collect API schema specifications from services
- Create a runtime instance of fully-typed SDK for the services.
- Convert API specs to GraphQL schema
- Applies custom schema transformations and schema extensions
- Creates fully-typed, single schema, GraphQL SDK to fetch data from your services.