⬡ GraphQL Intermediate

What is schema stitching versus Apollo Federation in GraphQL?

Answer

Schema stitching (from graphql-tools) is an older approach that merges multiple GraphQL schemas into one by combining their types and resolvers at the gateway level. It requires the gateway to know about all sub-schemas and manually define how they connect. Apollo Federation is a newer, more scalable approach where each service owns its own subgraph schema and can extend types owned by other services using @key and @extends directives. The gateway automatically composes the unified supergraph. Federation gives teams true independence — services can be deployed separately, and the gateway generates the query plan automatically. Federation is now the industry standard for microservices-based GraphQL.