API / Apollo Gateway Interview questions
Why do we use Apollo Federation instead of GraphQL schema stitching?
Schema stitching requires a central gateway service to know the full shape of every downstream schema and manually merge them with delegation and merge functions. As more teams and schemas get added, that central merge logic becomes a bottleneck — every schema change anywhere in the graph risks breaking the stitching layer, and the team owning the gateway ends up as an unwilling reviewer of everyone else's schema changes.
Federation flips that responsibility: each subgraph declares, through directives like @key, exactly how its types relate to other subgraphs' types. Composition then merges everything automatically according to those declarations, with validation that catches conflicts before they reach production.
The practical result is that subgraph owners can evolve their own schema independently, without coordinating a central merge function, which is the main reason federation scales better across many autonomous teams than stitching does.
More Related questions...