Our solution
Restrictive by design
The router evaluates Cache-Control directives from every subgraph involved in a response and applies the strictest policy. You set a global default and per-subgraph overrides. The algorithm handles the rest.
How cache policy aggregation works
Set `cache_control_policy.enabled: true` in your router configuration. Define a global default value, for example `max-age=180, public`.
Add per-subgraph overrides where specific policies are needed. A pricing subgraph might get `no-cache`; a static content subgraph might get `max-age=3600, public`.
On each request, the router collects Cache-Control headers from all subgraph responses involved in the query.
The restrictive algorithm runs: `no-cache` and `no-store` take priority over everything. The smallest `max-age` value wins. The earliest `Expires` header is used.
GraphQL mutations automatically receive `Cache-Control: no-cache` when a global policy is enabled, regardless of subgraph settings.
Responses with any errors automatically receive `Cache-Control: no-store, no-cache, must-revalidate`.
One config block. Correct headers on every response.

