MCPcopy
hub / github.com/ardatan/graphql-mesh

github.com/ardatan/graphql-mesh @v1.4.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.4.0 ↗
2,045 symbols 6,884 edges 838 files 11 documented · 1%
README

Mesh GIF

Created by The guild

 

GraphQL Mesh


GraphQL Federation framework for any API

Go to documentation

npm version CI Discord Chat code style: prettier

GraphQL Mesh is a GraphQL Federation framework and gateway for both GraphQL Federation and non-GraphQL Federation subgraphs, non-GraphQL services, such as REST and gRPC, and also databases such as MongoDB, MySQL, and PostgreSQL.

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 let developers easily access services that are written in other APIs specs (such as gRPC, OpenAPI/Swagger, OData, SOAP/WSDL, Apache Thrift, Mongoose, PostgreSQL, Neo4j, and also GraphQL) with GraphQL queries and mutations.

GraphQL Mesh gives the developer the ability to modify the output schemas, link types across schemas and merge schema types. You can even add custom GraphQL types and resolvers that fit your needs.

It allows developers to control the way they fetch data, and overcome issues related to backend implementation, legacy API services, chosen schema specification and non-typed APIs.

GraphQL Mesh is acting as a proxy to your data, and uses common libraries to wrap your existing API services. You can use this proxy locally in your service or application by running the GraphQL schema locally (with GraphQL execute), or you can deploy this as a gateway layer to your internal service.

How does it work?

The way GraphQL Mesh works is:

  1. Collect API schema specifications from services
  2. Create a runtime instance of fully-typed SDK for the services.
  3. Convert API specs to GraphQL schema
  4. Applies custom schema transformations and schema extensions
  5. Creates a Federation subgraph or a Federation-compatible supergraph

Getting started

Supported Source APIs

Schema Transformations

Contributions

Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!

And if this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

Code of Conduct

Help us keep GraphQL Mesh open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant

License

GitHub license

MIT

Extension points exported contracts — how you extend this code

MeshHandler (Interface)
(no doc) [14 implementers]
packages/legacy/types/src/index.ts
IHandler (Interface)
(no doc) [2 implementers]
examples/thrift-calculator/src/codegen/Calculator.ts
IGraphQLThriftClient (Interface)
(no doc) [1 implementers]
packages/transports/thrift/src/client.ts
ObjectConstructor (Interface)
(no doc)
declarations.d.ts
SubgraphConfig (Interface)
(no doc)
packages/fusion/composition/src/compose.ts
GatewayConfigContext (Interface)
(no doc)
packages/serve-runtime/src/types.ts
RunOptions (Interface)
(no doc)
packages/compose-cli/src/run.ts
JSONSchemaVisitorContext (Interface)
(no doc)
packages/json-machete/src/visitJSONSchema.ts

Core symbols most depended-on inside this repo

get
called by 259
packages/legacy/types/src/index.ts
set
called by 180
packages/legacy/types/src/index.ts
execute
called by 150
packages/legacy/runtime/src/get-mesh.ts
debug
called by 145
packages/legacy/utils/src/logger.ts
error
called by 121
packages/legacy/utils/src/logger.ts
parse
called by 113
packages/string-interpolation/src/interpolator.js
mapMaybePromise
called by 90
packages/legacy/utils/src/map-maybe-promise.ts
keys
called by 89
declarations.d.ts

Shape

Function 1,080
Interface 452
Method 366
Class 144
Enum 3

Languages

TypeScript100%

Modules by API surface

packages/legacy/types/src/config.ts134 symbols
packages/loaders/soap/src/types.ts62 symbols
e2e/utils/tenv.ts48 symbols
examples/thrift-calculator/src/codegen/Calculator.ts43 symbols
e2e/thrift-calculator/services/calculator/__generated__/Calculator.ts43 symbols
packages/legacy/types/src/index.ts28 symbols
packages/loaders/soap/src/SOAPLoader.ts26 symbols
packages/legacy/store/src/index.ts26 symbols
packages/string-interpolation/src/interpolator.js25 symbols
packages/legacy/utils/src/logger.ts24 symbols
packages/serve-runtime/src/createGatewayRuntime.ts23 symbols
packages/loaders/odata/src/directives.ts22 symbols

Dependencies from manifests, versioned

@apollo/client3.11.8 · 1×
@apollo/gateway2.4.1 · 1×
@apollo/server4.11.0 · 1×
@apollo/subgraph2.4.1 · 1×
@ardatan/graphql-to-config-schema0.1.25 · 1×
@ardatan/grpc-reflection-js0.0.2 · 1×
@ardatan/raml-1-parser1.1.69 · 1×
@babel/core7.26.0 · 1×
@babel/plugin-proposal-class-properties7.18.6 · 1×
@babel/plugin-proposal-explicit-resource-management7.25.9 · 1×
@babel/preset-env7.26.0 · 1×
@babel/preset-typescript7.26.0 · 1×

Datastores touched

(mysql)Database · 1 repos
postgresDatabase · 1 repos
(mongodb)Database · 1 repos
RfamDatabase · 1 repos

For agents

$ claude mcp add graphql-mesh \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact