You're viewing documentation for a version of this software that is in development. Switch to the latest stable version
Launch Apollo Studio

Backward compatibility in Federation 2

FAQ


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

Probably not. You can move most existing graphs to Federation 2 and they compose successfully with no changes.

Graphs that do require changes are graphs that should cause certain composition errors that Federation 1 fails to detect. See below.

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 graph?

Probably not. Federation 2 provides more flexible composition rules compared to Federation 1. If 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. This enables you to continue using any customizations or plugins that you've added to your gateway.

Edit on GitHub