Skip to content

api-evangelist/schema-stitching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schema Stitching

Schema Stitching is a GraphQL technique for combining multiple GraphQL schemas into a single unified API gateway. It enables developers to compose distributed GraphQL services, integrate third-party APIs, and build federated data layers by merging types, queries, and mutations from multiple subgraphs into one executable schema.

The primary implementation is provided by The Guild's @graphql-tools/stitch package, which supports type merging, stitching directives, schema delegation, and automated query planning comparable to Apollo Federation.

Human URL: https://the-guild.dev/graphql/stitching

Resources

Core Concepts

Type Merging — Merges types with the same name from multiple subschemas into a single unified type at the gateway. Keys identify objects for cross-service resolution.

Schema Delegation — The mechanism by which the gateway proxies field resolution to underlying subschemas, forwarding queries to each service's executor.

Stitching Directives — SDL directives (@key, @merge, @computed, @canonical) that let subservices declare their own merging configuration for gateway-reloadable composition.

Schema Transforms — Functions applied to subschemas before stitching: rename types, filter fields, wrap queries, hoist fields, or prune schemas.

Related Tools

Tool Purpose
GraphQL Mesh Stitch REST, gRPC, and database sources into GraphQL
Hive Gateway Federated GraphQL router supporting stitching and federation
Apollo Federation Alternative supergraph composition approach
GraphQL Yoga GraphQL server compatible with schema stitching

Artifacts

JSON Schema

JSON Structure

JSON-LD

Examples

Vocabulary

Maintainers

Kin Lanekin@apievangelist.com

About

Schema Stitching is a GraphQL technique for combining multiple GraphQL schemas into a single unified API gateway. It enables developers to compose distributed GraphQL services, integrate third-party APIs, and build federated data layers by merging types, queries, and mutations from multiple subgraphs into one executable schema.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors