Our solution
Feature flags for safer GraphQL schema delivery
Feature subgraphs are alternative implementations of base subgraphs in your federated graph. When a feature flag is active for a request, Cosmo Router uses the feature subgraph instead of the base subgraph for that request. Teams can roll out schema changes by header or cookie without deploying a new router version.
How it works
Create a feature subgraph as an alternative implementation of a base subgraph.
Group one or more feature subgraphs into a feature flag. Its labels decide which federated graphs it applies to.
Enable the flag. Routers that fetch config from Cosmo pick up the change on their next config poll. Routers that run from a static config file need the updated file.
Requests select the flag with a header or cookie, set by your load balancer, API gateway, or client.
For matching requests, Cosmo Router uses the graph composition with the feature subgraph. Other requests continue using the base composition. To roll back, stop sending the flag or disable it, without deploying new router versions.
Schema-aware. Federation-native. Without deploying new router versions.

