We’re excited to announce Apollo Federation 2, an evolutionary step forward that builds on the success of the original version with an improved shared ownership model, enhanced type merging, and cleaner syntax for a smoother developer experience. It’s backwards compatible, requiring no major changes to your subgraphs. Try the alpha today!
Apollo Federation is an architecture for declaratively composing APIs into a unified graph. Each team can own their slice of the graph independently, empowering them to deliver autonomously and incrementally.
Designed in collaboration with the GraphQL community, Federation 2 is a clean-sheet implementation of the core composition and query-planning engine at the heart of Federation. We’ve improved the developer experience by adding deeper static analysis, cleaner error messages, and new composition hints that help you catch errors sooner and understand how your schema impacts performance. With the new version, we’ve streamlined common tasks like extending a type and simplified advanced workflows like migrating a field across subgraphs with no downtime.
Following in the footsteps of modern infrastructure projects like Elasticsearch and MongoDB, we’re moving Federation 2 to the Elastic License v2 – an open and permissive license with few restrictions. This change shouldn’t affect the vast majority of our community, and the new code is still free to use and modify. Subgraph packages will remain MIT, as well as the 0.x Federation packages, so there are no changes to what you’re doing today.
While Federation 2 is backwards compatible, it’s enhanced validation might catch a few things that the original Federation didn’t. Things you’ll be happy to know about!
Read the blog post for more details and let us know what you think!