Q46: How does federated entity caching work across gateway subgraphs?

Difficulty:ExpertTopic:Federation & Caching

In Apollo Federation, entity requests cross network boundaries. Subgraph entity responses can include caching headers or directives (@cacheControl). The gateway can cache entity representations, skipping redundant calls to underlying subgraphs for shared entities.

Key Takeaways
  • Federated gateways cache entity reference lookups to minimize cross-service microservice latency.
Knowledge Check

What is the key benefit of federated entity caching at the Gateway level?