API / Apollo Gateway Interview questions
What is Apollo Federation 2?
Federation 2 is the second major version of Apollo's federation specification. It keeps the same core idea — composing many subgraph schemas into one supergraph — but relaxes several of Federation 1's stricter composition rules and adds new directives that make common patterns easier to express safely.
- @shareable – explicitly marks a field as intentionally resolvable by more than one subgraph.
- @override – migrates ownership of a field from one subgraph to another without downtime.
- @inaccessible – hides a field from the public API surface while still allowing it internally.
- @interfaceObject – lets a subgraph contribute fields to an interface without knowing every concrete implementing type.
Subgraphs opt in with extend schema @link(url: "https://specs.apollo.dev/federation/v2.x"), and Federation 2 composition remains backward compatible with Federation 1 subgraphs, so teams can migrate incrementally rather than all at once.
More Related questions...