API / Apollo Gateway Interview questions
What is the difference between @override and @external for migrating fields?
Both can technically be used while relocating a field, but they were designed for different purposes and @override is the purpose-built tool for the job.
The @external + @requires/@provides combination was originally meant to express genuine cross-subgraph data dependencies — "I need this other subgraph's field to compute mine." Using it purely to migrate a field's ownership forces you to keep careful, matching annotations in both subgraphs during the transition, and composition still treats ownership fairly statically.
@override(from: "OldSubgraph"), added in Federation 2, says outright: "this field now lives here." Composition automatically routes queries for that field to the new owner, and GraphOS Enterprise even supports a progressive/percentage-based override so you can shift traffic to the new subgraph gradually and roll back instantly if something's wrong — something the older directive combination was never designed to support cleanly.
More Related questions...