API / Apollo Gateway Interview questions
What are contract variants in GraphOS?
Contracts let you publish a filtered view of the full supergraph to a specific audience, without hand-maintaining a second schema by hand.
You tag fields and types in your subgraph schemas with @tag, then define a contract that includes or excludes fields based on those tags (or you can hide something entirely from a contract's public surface with @inaccessible). GraphOS then generates and serves a separate composed schema variant for that contract — for example, a "partner" contract that excludes internal-only admin fields, or a "mobile" contract limited to what a mobile client actually needs.
This is especially useful for gradual feature rollout: you can add a field to the internal graph, tag it, and only expose it through the public-facing contract once it's ready, without ever maintaining a duplicate schema definition by hand.
More Related questions...