Apollo Federation lets teams build and operate services independently while contributing to the same overall graph. Let each service implement just the part of the graph it's responsible for. Empower your teams to go faster while embracing a single source of truth for your graph.
At the center of Apollo Federation is the gateway, which composes the individual schemas of your services into a federated data graph and then routes incoming operations across those services. It determines a query plan for every request it receives and facilitates the request split and response combination automatically.
The declarative nature of composition allow you to federate a common graph even when your services are built in different languages and hosted in different locations. Each service implements a superset of the GraphQL syntax, using directives to define how its data should be composed into the graph.
Apollo Federation is our answer for implementing GraphQL in a service-oriented architecture. It’s designed to replace schema stitching and solve pain points such as coordination, separation of concerns, and brittle gateway code. It also supports incremental evolution of your architecture so you can migrate to federation over time if you are migrating from a monolithic graph or consolidating multiple graphs.
Federation can be run in two modes: unmanaged and managed.
With unmanaged federation, you configure your gateway with a list of your services. You restart your gateway to pick up changes from your underlying services and recompose your graph.
With managed federation, you push the schema from each of your services to Apollo Studio, our cloud GraphQL management platform. Studio composes them for you and creates a configuration file that your Gateway fetches on startup and polls regularly. This lets your gateway pick up changes to the graph without having to restart itself.
You can modify, add, and remove services from your graph without needing to modify or redeploy your gateway.
Studio checks for successful composition before updating schema configuration, so your gateway is always running a valid schema.
Studio's Schema Checks will also check for valid composition if running on a graph using managed federation.
Query Plan Visualization
Studio's Explorer will calculate query plans inline with your operations as you write them.
"Apollo Federation will allow us to implement our existing schema linking in a safer, declarative manner, while opening up a whole new level of broader federation opportunities across the wider enterprise."
Dan Boerner @ Expedia Group
"Ensuring that our core content teams could own their respective content schema while our cross-content teams could write efficient queries to pull this content was key for us to further adopt this technology, and that is what Apollo’s federated graph enabled for us."
Sankha Pathak @ Glassdoor
Get in touch with us and let us know how we can support you and your team to build your data graph.Contact Sales