Mesh

GraphQL Mesh

Unify your API landscape with Mesh’s federated architecture, integrating any API service into a cohesive graph. Part of the Hive ecosystem by The Guild.

Query anything, run anywhere

Connect datasources

Transform non-GraphQL services into GraphQL-ready interfaces with Mesh, enhancing API consistency.

  • Automate the creation of type-safe GraphQL APIs from any data source, ensuring reliability and developer efficiency.

  • Enhance data sources by integrating additional data with full type safety, using Mesh.

  • Extend the capabilities of your schema with Mesh by mocking, caching, and transforming data seamlessly.

Mobile App
Web App
Node.js Client
GraphQL Mesh
Books REST API
Authors gRPC API
Stores GraphQL API

See live examples in action

Query anything

Bring every source into one graph: GraphQL and REST APIs, gRPC, SOAP, and databases.

Manipulate data

Transform and tailor your schema within Mesh to meet specific business requirements efficiently.

Naming conventions
Customize field names within your GraphQL schema using Mesh's flexible naming conventions.
Modify results
Refine and adjust query results directly within Mesh to suit precise user needs.
Alter resolvers
Incorporate middleware into your resolvers with Mesh, enhancing your GraphQL service's functionality.
Schema structure
Employ Mesh to merge types and extend sources, structuring your GraphQL schema optimally.

Consider switching from other tools?

Learn the differences between Mesh, Apollo Federation, Hasura and GraphQL Tools

Productivity / MaintainabilityUnified Schema designSub-services support
GraphQL MeshPackages with a server, caching, Envelop plugins, and large sub-service types support. Configuration-based with custom resolvers.Flexible Schema design with Transforms and custom resolvers support.Support for a large range of types of sub-services and databases.
GraphQL ToolsProgrammatic approach at the Gateway level. Type merging makes it easier to deal with sub-services conflicts.Access to all GraphQL Schema building libraries.Only supports GraphQL sub-services out of the box. Other sub-service types can be supported with Schema extensions at the Gateway level.
Apollo Server with DataSourcesRequires a lot of coding and maintenance work at the DataSources level.Access to all GraphQL Schema building libraries.Integrating with some types of sub-services might require some extra work.
Apollo FederationRover CLI and Apollo Studio. Only the Apollo Gateway needs maintenance.Access to all GraphQL Schema building libraries.Only supports 'Federation compliant' GraphQL sub-services.
HasuraPlug and play solution. Configuration-based with custom resolvers.The Unified Schema is directly linked to the underlying database schema or sub-services design.Only supports GraphQL and REST sub-services and a set of databases.

Run anywhere

Deploy Mesh across any JavaScript environment, powered by its versatile Fetch API compatibility.

Extend the capabilities

Expand your gateway capabilities robustly with Mesh plugins, tailored to your enterprise needs.

Discover the complete ecosystem of tools and libraries

Complete GraphQL Federation Stack

Our libraries to support all your GraphQL needs

Explore the Ecosystem

Frequently Asked Questions

What is GraphQL Mesh?

GraphQL Mesh is a framework for building GraphQL gateways over GraphQL and non-GraphQL sources. You can compose REST/OpenAPI, gRPC, SOAP, databases, and GraphQL APIs into one supergraph, then query them with GraphQL. See the v1 introduction for the current architecture.

What is the difference between Mesh Compose and Hive Gateway?

Mesh Compose turns your sources into a supergraph. Hive Gateway serves that supergraph (or one from Hive or Apollo GraphOS) with auth, caching, rate limiting, and observability. You can also serve a Mesh supergraph with other Federation-compatible gateways.

Should I use Mesh v0 or v1?

Use Mesh v1 for new work. v0 is the legacy runtime still documented under Mesh v0 docs. If you are on v0, follow the migration guide.

Can I expose REST or OpenAPI as GraphQL?

Yes. Mesh Compose can load OpenAPI/Swagger and JSON Schema sources and emit GraphQL subgraphs you can query, transform, and merge. Start with source handlers and the OpenAPI handler.

Does GraphQL Mesh work with Federation?

Yes. Mesh Compose can produce Federation-compatible subgraphs and supergraphs, including from non-GraphQL services. You can register them in GraphQL Hive or Apollo GraphOS, or run them with Hive Gateway. See Federation transforms and type merging.

Can I use Mesh without deploying a gateway?

Yes. You can execute the composed schema in-process inside your Node.js app, or run Hive Gateway as a standalone proxy. Same compose output, different serving model.

How do I combine multiple APIs into one schema?

Compose each API as a source, then use transforms (prefix, rename, filter, encapsulate) and schema extensions such as @resolveTo to link types across sources. The getting started guide walks through a full compose config.

How do I migrate from Mesh v0 to v1?

v1 splits compose (Mesh Compose) from serve (Hive Gateway) and uses a new config format. Follow Migrate to GraphQL Mesh v1 for a source-by-source mapping from .meshrc to mesh.config.ts.