Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL Federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free

Backward Compatibility in Apollo Federation 2

Navigating the transition from Apollo Federation 1 to Federation 2


Is official support ending for @apollo/gateway v0.x?

Yes. As of 15 November 2022, @apollo/gateway v0.x is officially deprecated, with end-of-life scheduled for 22 September 2023. @apollo/gateway v2.x remains fully supported.

Learn more about deprecation and end-of-life.

Do I need to modify my subgraph schemas to use Federation 2?

Eventually. The process of moving to Federation 2 has three steps:

  1. Upgrade your gateway to support Federation 2 (we recommend moving to the GraphOS Router).
  2. Begin composing your with Federation 2 logic.
  3. Update your individual to use Federation 2 features and .

Steps 1 and 2 usually require no changes to your . Schemas that do require changes are schemas that should cause certain composition errors that Federation 1 fails to detect (see below.).

Step 3 does require some changes to your subgraph schemas, described here.

Breaking changes

As mentioned above, the following Federation 1 examples should produce composition errors, but they aren't detected. If your subgraph schemas include syntax that matches any of these, you need to update those schemas before moving to Federation 2.

Can Federation 1 compose my Federation 2 subgraph schemas?

No, not after you convert at least one subgraph schema to a true Federation 2 schema.

Federation 2 provides more flexible composition rules compared to Federation 1. After you modify your subgraph schemas to take advantage of this flexibility, your graph will no longer compose with Federation 1. You need to revert these changes to move back to Federation 1.

Does @apollo/gateway v2 support Federation 1?

Yes. If you want, you can update your gateway's @apollo/gateway library to its latest 2.x version before you're ready to move your graph to Federation 2.

Your plugins and customizations for @apollo/gateway 0.x will continue to work as expected in @apollo/gateway 2.x.

Compatibility table

Router/Gateway versionFederation 1
Composition
Federation 2
Composition
Apollo Router Core v1.x🟢🟢
@apollo/gateway v2.x🟢🟢
@apollo/gateway v0.x (deprecated)🟢
Previous
Steps to Move
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc., d/b/a Apollo GraphQL.

Privacy Policy

Company