Q34: What is the difference between Schema Stitching and Apollo Federation?
- Schema Stitching: Imperative backend approach where a gateway server merges multiple underlying GraphQL schemas by writing explicit code adapters and delegate resolvers.
- Apollo Federation: Declarative architecture where subgraphs declare entity types (
@key) independently. A gateway automatically builds a unified supergraph schema without custom delegate resolver code.
Key Takeaways
- Federation uses declarative SDL annotations (
@key) across independent subgraphs. - Stitching requires explicit manual plumbing and delegation code in gateway resolvers.
Knowledge Check
Which architecture relies on declarative subgraph directives like `@key` to join microservices?