Schema Governance: The Org Chart Becomes a Type System
Ownership Is Per Field, Not Per Type
"Who owns Member?" has no answer in Federation 2, and that's the design. The entity is shared. Each field has exactly one resolving subgraph unless someone marks it @shareable (see Federation's model). On the home page, the profile team owns Member.avatarUrl, language and maturityLevel. Membership owns Member.entitlement. Personalization owns Member.homePage. Composition rejects a second unmarked claim to any of those fields. That's the org chart being type-checked.
That's also the organizational problem federation was brought in to fix. Netflix's Part 1 post (Nov 2020) lists the Studio API monolith's bottlenecks. The first was that "the Studio API team was disconnected from the domain expertise and the product needs, which negatively impacted the schema's health." Per-field ownership puts the domain experts back in charge of their own fields. It also means no single team is now responsible for the graph as a whole, so governance has to be added back on purpose.
Netflix's governance, as published
| People | "a schema working group and a managed technical program for on-boarding" (Part 2, Dec 2020). It meets weekly, with "a schema architect that understands the entire surface area of the graph" (QCon Plus 2020 Q&A). Kavitha Srinivasan (InfoQ podcast, Jan 2021): "any team that wants to be part of this federated graph needs to participate". Rigor scales with blast radius: "for the core federated types, more rigor is required". |
|---|---|
| Registry | Every push is validated as a valid schema that "composes seamlessly" and "is backwards compatible" (Part 1). The registry is built in-house in Kotlin, event-sourced on Cassandra, with a schema-history view. |
| Lifecycle | An @experimental directive lets new fields change without the deprecation process. Per-field client usage is tracked at the gateway, and a removal is allowed only when the field is @deprecated and usage is zero (InfoQ podcast, Jan 2021). |
| Design stance | Schema-first, "reflective of the domain itself, not the database model". Schemas aren't generated from Protobuf. "UI developers should not have to build Backends For Frontends (BFF) to massage the data for their needs, rather, they should help shape the schema". The culture is "context over control". |
Entities vs Value Types
The most consequential modelling call a working group makes is whether a type has identity. An entity has a @key. Other subgraphs can reference it and add fields to it, and every reference costs an _entities hop. A value type has no identity. It's a shape that several subgraphs return inline, with no hop, but every copy has to stay compatible.
| Home-page type | Model as | Why |
|---|---|---|
Member, Video | Entity | Several teams contribute fields, and clients re-find them by id. |
Page, Row | Plain types owned by personalization | They are computed per request and nobody else adds fields. A @key would invite contributions that break the page's consistency. |
Artwork | Plain type under Video.boxart | Its identity is (video, size, variant), and only the image team produces it. |
Bookmark | Plain type under Video, owned by viewing-history | It means something only for (member, video). Its profile: Member field is a reference, not a copy. |
ArtworkSize, Locale, Money | Shared value types / enums | Returned by many subgraphs. The merge rules below apply to them. |
Composition merges shared types by rule, per Apollo's sharing-types docs. Object types take the union of fields. Input types take the intersection, because the router may send an input to any subgraph that defines it. When one field has different nullability in different subgraphs, "composition uses the less restrictive definition", so String! in one and String in another composes to String. Enums used only as output merge by union, enums used only as input by intersection, and an enum used as both has to match exactly.
The Check Pipeline
Each tier of checks catches a different class of mistake. The later a class is caught, the more it costs:
In Apollo's tooling, steps 2–4 are one command: rover subgraph check my-graph@prod --name membership --schema ./membership.graphql. The Apollo checks docs list build, operations and linter checks, plus Enterprise-only custom, proposals and contract checks. Operation checks compare the change against "your graph's historical client operation data", and the default window is the last week with a threshold of 1 operation. Useful linter rules include FIELD_NAMES_SHOULD_BE_CAMEL_CASE, DEPRECATED_DIRECTIVE_MISSING_REASON and CONTACT_DIRECTIVE_MISSING, which requires a subgraph to declare its owning team through @contact. That's the tooling version of Netflix embedding each owner's "PagerDuty ID and Slack support channel … directly into the graph metadata". Steps 1–2 plus a backward-compatibility check are what Netflix's Part 1 describes. Step 6 is its working group.
What Counts as Breaking
Output and input positions break in opposite directions. Clients read outputs and write inputs, so a change that is safe on one side is breaking on the other. Apollo's nullability guide puts it this way: "converting a non-nullable argument to nullable is not a breaking change", while making an optional one required "may lead to breaking changes".
| Change | Structurally breaking? | The part a checker misses |
|---|---|---|
| Remove a field / type / enum value | Yes, if any operation uses it | Whether your usage sample includes every operation (next subsection) |
Output T → T! | No. Every existing reader still works. | Availability: nulls now bubble past this field (see Where the BFF's jobs go) |
Output T! → T | Yes, for typed clients (codegen types become optional) | Often done during an incident to stop the Where the BFF's jobs go part's bubbling, i.e. under pressure |
| Argument / input field: optional → required | Yes | — |
| Argument / input field: required → optional | No | — |
| Add a value to an output enum | Not by schema rules | Exhaustive when/switch in old clients. This is why Apollo Kotlin generates an UNKNOWN__ case. |
| Add a member to a union / implementer to an interface | Not by schema rules | Clients that assumed a closed set |
Change what a field means (e.g. maturityLevel scale 1–5 → 0–100) | No | Everything. Only review catches it. |
Usage Data vs Trusted Documents
Operation checks answer "would this break any operation we saw last week?" For a web app that deploys daily, that's close to "any operation that exists". For a TV home page it isn't. TV apps update on firmware and store cycles, old builds keep running for years, and some operations run only in rare states: a seasonal row, a first-run onboarding screen, a recovery path after a failed playback. A field used only by those operations looks unused in a one-week window.
Trusted documents (the term Benjie Gillam promotes; Apollo calls them persisted queries with safelisting) replace the sample with the complete set. Each client build extracts every operation at build time and registers the manifest, for example with rover persisted-queries publish. At run time the client sends only an id. Apollo's Router config gives the rollout ladder: persisted_queries.enabled, then log_unknown (the audit stage, recommended first), then safelist.enabled (unregistered operations are rejected), then safelist.require_id (only ids are accepted). Automatic persisted queries (APQ) don't count here. They register at run time, so they're a bandwidth optimization, not a contract. Netflix hasn't published whether its consumer apps use trusted documents. The reasoning above is why a long-lived-client platform would want them.
For governance, the result is that deprecation becomes a proof rather than a statistic. Remove the field from a candidate schema and validate every registered document for every client build still in the field. If they all validate, the removal is safe regardless of traffic. The manifest is also a security boundary. Netflix restricts introspection "to Netflix internal developers", and a safelist goes further: an attacker can't run an operation that no build ever registered.
Deprecation, End to End
- Add the replacement field, perhaps behind Netflix's
@experimentalconvention while its shape settles. Additions are always safe. - Mark the old one
@deprecated(reason: "Use `boxart(size:)`."). Since the September 2025 spec it works on arguments and input fields too, not just fields and enum values. The spec also forbids deprecating a required argument: "To deprecate a required argument or input field, it must first be made optional". That is itself a change to ship and roll out first. - Track who still reads it by client name and version. Apollo uses
apollographql-client-name/-versionheaders. Netflix tracks per-field usage at the gateway. Unidentified clients make step 4 impossible, so requiring client identity is a governance decision, not an observability nice-to-have. - Remove it only when usage is zero and no registered document for a supported build selects it. Once the removal is published it's an ordinary schema change; for a field being moved rather than retired, use
@override(see Federation's model, The migration playbook).
The lifecycle in SDL: image subgraph moving from a fixed-size field to a sized one
# @contact is a convention GraphOS reads, declared by the subgraph itself
directive @contact(name: String!, url: String, description: String) on SCHEMA
extend schema
@link(url: "https://specs.apollo.dev/federation/v2.7", import: ["@key"])
@contact(name: "Image Platform", url: "https://…/slack/image-platform",
description: "on-call: image-platform-pd")
type Video @key(fields: "id") {
id: ID!
# step 1: new field, nullable because it crosses a subgraph boundary (see: Where the BFF's jobs go)
boxart(size: ArtworkSize!): Artwork
# step 2: old field kept, deprecated with a reason the linter can check
boxartUrl: String @deprecated(reason: "Use `boxart(size:)`.")
}
# step 2b: deprecating an argument (allowed since Sept 2025) — only if optional
type Query {
artworkSearch(query: String!, legacyRegion: String @deprecated(reason: "Ignored."))
: [Artwork!]!
}What the human review actually checks
Automation handles structure, so the working group's time should go to the questions no checker can answer. For the home page, a review checklist that follows from the Where the BFF's jobs go part and this part:
| Question | Why a machine can't answer it | Home-page example |
|---|---|---|
Does any new ! cross a subgraph boundary? | Adding Non-Null passes every structural check | Video.title: String! in catalog |
| Is this a new entity, or a field on an existing one? | Composition accepts both | ProfileMember vs Member.avatarUrl |
| Is an argument carrying trust? | An argument that should have been context looks fine to a checker | deviceSupportsUhd: Boolean (see Where the BFF's jobs go) |
Does a @shareable copy stay in sync with the owner? | "make sure each subgraph's resolver … behaves identically" can't be checked | Personalization's cached Video.title (the Federation's model part trap) |
| Is a list bounded, and by whom? | Demand control prices @listSize, but only the owner knows the right maximum | maxTitlesPerRow clamping (see Where the BFF's jobs go, see Operating the gateway) |
| Does the type follow the domain or the team? | That's a question about the org chart | See the next subsection |
Nullability Is an Availability Decision
Apollo's guidance is to default to nullable ("it's often best to err on the side of embracing that default behavior") and to treat fields resolved from other data sources as nullable "given the potential for the request to fail". Federation makes almost every field that kind of field. The Where the BFF's jobs go part derived the review rule: Non-Null only if the value comes from the same fetch as its parent. In the query planner part's schema, rows: [Row!]! and videos: [Video!]! pass the rule, and boxart, title and bookmark stay nullable. This review item needs a human, because no check objects when you add a !. Changing T to T! is structurally safe, so every automated tier passes it.
Client teams will push back, since a mostly-nullable schema means null checks everywhere. The standards work is aimed at exactly this problem: the Nullability WG's "semantic non-null" (Stage 0 / strawman) and onError error behaviors (a proposal, not in the September 2025 spec), with Relay and Apollo Kotlin already offering client-side versions. Until one of them lands, the schema's ! is the only server-side lever, and it's a global availability decision made once for every client.
Conway's Law, Both Directions
Federation deliberately gives each field an owning team, so the graph ends up mirroring the org chart. That's fine when the org chart matches the domain. When it doesn't, the graph copies the org chart's mistakes. The home-page example already has a borderline case. "The member" is split between a profile service and a membership service because two teams exist, and a client only sees that as Member.entitlement resolving in a different subgraph. Handled well, that's invisible. Handled badly, it becomes ProfileMember and MembershipMember, two types for one person, and every client joins them by hand, which is exactly the BFF work federation was supposed to remove.
The reverse direction costs money too. A reorg that moves entitlements into the profile team doesn't have to touch the API schema. It's a run of @override migrations (see Federation's model) that clients never see. That is federation's real organizational win: the API schema can outlive the org chart, but only if the working group insisted from the start that types model the domain ("reflective of the domain itself, not the database model"), even though a team boundary would have been easier to draw.
The Invariants
- Guarantees: Every field has one declared owner unless explicitly
@shareable. A publish that doesn't compose, or that removes something a registered operation selects, can be blocked before any router loads it. Deprecation can be made provable (usage plus trusted documents). Owner contact metadata can be required on every subgraph. - Does not guarantee: That a usage window has seen every operation a long-lived client runs. That adding a
!is safe (every check passes it). That composition keeps nullability as a team wrote it (the looser version wins). That semantic changes are detected. Or that the graph models the domain rather than whichever team happened to own the service. Those take human review, and Netflix staffed it as a weekly working group.