3

I'm new to both concepts so excuse me if it's opinion-based. Currently, I'm looking at Apollo Federation and schema stitching provided by the graphql-tools package, though I guess it applies to similar packages. Could something like a table be created describing certain requirements/conditions to prefer one over the other?

ZenVentzi
  • 3,945
  • 3
  • 33
  • 48

1 Answers1

3

Apollo's GraphQL Federation and "schema stitching" both accomplish a similar goal: unify multiple GraphQL APIs under a single GraphQL API.

Based on my understanding, the main differences between them are:

  • In Apollo's Federation, subgraph services own the logic for linking shared types together; in schema stitching, this logic is handled by the gateway.
  • Apollo's Federation distributes the ownership of subgraphs to the individual service teams; stitching assumes centralized responsibility of the full schema.
  • Apollo's Federation is tightly coupled to the Apollo ecosystem; GraphQL Tools' schema stitching is more open source.

For more details, I'd recommend reading https://product.voxmedia.com/2020/11/2/21494865/to-federate-or-stitch-a-graphql-gateway-revisited.

Logan
  • 1,575
  • 1
  • 17
  • 26