Where the BFF's Jobs Go
Taking the BFF Apart
The organizing line says a BFF owns a screen and a subgraph owns an entity. Going through the TV BFF's jobs one at a time and asking "screen or entity?" gives the whole migration map. Some jobs land cleanly in one place, some split, and a few belong to neither.
| BFF job (TV home page) | After federation it lives in | Belonged to | What gets harder |
|---|---|---|---|
| Orchestration: call order, parallelism, joins | Query planner, derived from @key / @requires (see The query planner) | Neither: it was mechanical | You can't hand-tune a join any more. A @requires buys you a sequential hop. |
| Request-scoped dedupe (Hystrix request cache) | Split between the planner (merges by shape), the Router (dedupes keys inside one fetch) and a DataLoader inside each subgraph | Neither | "Once per request" becomes "once per (subgraph, path)". The query planner part gives the exact rule. |
| Payload shaping and trimming | The client's selection set | Screen | Nothing. This is the part GraphQL does best (see What GraphQL changes). |
| Device policy: row counts, artwork sizes | Field arguments the client passes | Screen | Subgraphs must clamp arguments. An argument is a request, not a policy. |
| Trust-bearing policy: UHD badge, plan-gated rows | The owning subgraph, reading authenticated device and member context | Entity | That context has to be propagated to every subgraph. |
| Page composition: which rows, what order, dedupe across rows | The personalization subgraph that owns Page/Row | Entity (the page is a domain object) | Personalization now owns a public contract, not an internal RPC. |
| Fallbacks and partial failure | Three places. See below. | Split | Per-screen required/optional choices disappear. |
| Caching | Subgraphs, plus EVCache under them | Entity | Staleness rules are set by each owner, not one per page. |
| AuthN / AuthZ | Gateway / subgraph owners | Neither / entity | Every subgraph must enforce its own rules. |
| A/B cell, old-client shims, cross-entity writes | Nowhere obvious. See the last subsection. | Neither | These are the jobs a migration forgets. |
Netflix's own description of the destination matches the Router box: an appliance with no fallback logic in it. In the QCon Plus 2020 talk "How Netflix Scales Its API with GraphQL Federation", Stephen Spalding describes the before state: "In order to handle failure gracefully. They added fallback logic into the gateway, simple caches, … along with the business logic. Before they knew it, the API gateway had become the new monolith." The goal, in his words, is that federation lets you "remove the business logic from the core aggregator, so that it becomes an appliance, like a reverse proxy." Part 2 of the tech-blog series (Dec 2020) puts it as a design principle for the gateway, "Single purpose": "parse client queries, then build and execute query plans". On caching, from the same talk: "we are letting the Federated services themselves make the decisions on caching." Studio had already watched this go wrong once. Its first GraphQL tier was "a thin API gateway layer" that stitched team schemas together, and Kavitha Srinivasan (InfoQ podcast, Jan 2021) says it "just added on more and more business logic to the gateway, which is a huge anti-pattern". Logic creeps into whatever layer can see everything. A federated router can see everything too, so "no business logic in the router" has to be a rule someone enforces. It doesn't happen on its own.
The orchestration row comes with a condition. The planner plans from the shape of the query, not from values (see The query planner). So it can only remove a call it can see, meaning a dependency written into the schema: a field the client selects, a @requires, or a @fromContext. The Netflix guide's "BFF → service A → user-service" chain goes away only when service A's hidden call to user-service becomes one of those. If personalization keeps calling the member service inside its resolver, the graph has the same five hidden calls the BFF had, with a router in front of them. Much of the orchestration work in the migration is turning hidden RPCs into declared schema dependencies.
Device Policy: Arguments, Context, or a Page Owner
The TV BFF knew things the phone BFF didn't. The TV homepage holds more rows, artwork comes at 10-foot sizes, and some features depend on what the device can do. Netflix's recommender paper (Gomez-Uribe & Hunt, ACM TMIS, 2015) gives the only published numbers: "typically about 40 rows on each homepage (depending on the capabilities of the device), and up to 75 videos per row", varying "across devices because of hardware and user experience considerations". Netflix hasn't published per-device values. After federation, each piece of device policy goes to one of three places, and the test is what happens if the client lies.
1 · Shape policy → field arguments
If a lying client only hurts itself or costs you capacity, make the policy an argument. That covers how many rows, how many titles per row and what size of image. The query planner part's schema already does this with homePage(device: Device!) and boxart(size: ArtworkSize!). Making the knobs explicit is usually better than one opaque device enum, because the enum hides a server-side table that has to stay in step with every client release:
type Member @key(fields: "id") {
id: ID!
homePage(layout: PageLayout!): Page @requires(fields: "maturityLevel language")
}
input PageLayout {
maxRows: Int! # TV asks ~40; the server clamps
maxTitlesPerRow: Int! # "up to 75"; the server clamps
}
type Video @key(fields: "id") {
id: ID!
boxart(size: ArtworkSize!): Artwork # TV_LARGE vs PHONE_SMALL
}An argument is a request, so personalization has to clamp maxRows itself. The router's demand control can price it (@listSize(slicingArguments: ["maxTitlesPerRow"]), see Operating the gateway), but only the owner knows what the maximum should be. Arguments also make the policy visible in the operation text, so it shows up in persisted documents (see Schema governance), in traces and in parity diffs (see The migration playbook). The BFF's version lived in if (device == TV) branches.
2 · Trust-bearing policy → the owning subgraph, from context
If a lying client would gain something, the policy can't be an argument. The UHD badge is the example: a title is marked 4K only if the plan includes UHD and the device is certified for it. That decision belongs to membership (the Entitlement owner) or catalog, and it reads device identity from authenticated request context, not from the query.
✗ Capability as an argument: spoofable
type Video @key(fields: "id") {
id: ID!
# client says it can do 4K; server believes it
playableQualities(deviceSupportsUhd: Boolean!):
[Quality!]!
}✓ Capability from authenticated context
type Video @key(fields: "id") {
id: ID!
# membership/catalog read the device's
# certified profile from the propagated
# auth context (device ESN -> capability)
playableQualities: [Quality!]
}This is where the BFF's lack of structure helped it. It sat on the authenticated session, so the check was a local variable. In the graph, the router has to forward that context (headers, or a signed token) to every subgraph, and each subgraph has to trust the router's forwarding and nobody else's. Netflix Studio's arrangement, from the same talk: "We do the authentication at the gateway level. That's centralized. Then the authenticated user information is provided to these individual federated graph services."
3 · Policy that is really a screen → a thin BFF in front of the graph
A third kind of policy is neither a knob nor an entitlement. It's the layout itself: server-driven UI, a device that can't run a GraphQL client, or a legacy protocol. A thin per-device layer in front of the router is still legitimate for these cases. It holds a persisted operation per screen and does no joins. If it starts making a second call to "fix up" the graph's answer, the BFF is growing back. Netflix went the other way during the consumer migration: its GraphQL Shim sat over the legacy Falcor API (see Netflix's actual path).
Fallbacks After Federation: Where the Hystrix Fallback Lives
In the BFF, one process held the whole page. The Netflix Architecture guide's Strangler Fig Migration part says so directly: "Assembly is where optional vs. required is decided, per dependency, by the BFF", so a failed personalization call "becomes a fallback row". Its table (in the One Press of Play part of the Netflix Architecture guide) gives each such fallback a mechanism: generic rows, default artwork, last-known bookmark. Federation spreads that one decision across three tiers, split by which thing failed.
| What failed | Who can react | What it can do | Home-page example |
|---|---|---|---|
| A dependency behind a subgraph (ranking service, image bandit, Cassandra) | The subgraph's resolver | A real Hystrix-style fallback (resilience4j or similar) around its own downstream call, returning a degraded but valid value | Personalization returns popular-in-country rows. Image returns default artwork. |
| The subgraph itself (down, slow, 5xx, bad deploy) | The router | Only a timeout, then null at every path that fetch should have filled, an error with a path, and the spec's null propagation. No substitute value. | Every boxart becomes null. How far that null spreads depends on the schema. |
Nothing failed; a field came back null | The client | Decides how null renders: placeholder tile, hidden row, retry | The TV draws the title text on a plain tile. |
The middle row is the one that surprises BFF veterans. Netflix's gateway is "single purpose" by design, and Apollo's Router is similar. Its traffic shaping config (traffic_shaping.all.timeout, traffic_shaping.subgraphs.<name>.timeout, rate limits, deduplicate_query) has no field for a fallback value. When a subgraph times out, "the router returns a GraphQL-compliant HTTP 200 status code" with partial data. You could technically write substitute values from a Rhai script or coprocessor. Doing that puts product logic back in the shared tier, which is exactly the monolith Netflix's talk describes.
What the null does next: the schema is the fallback policy
The spec (September 2025 edition, "Handling Execution Errors", previously "Handling Field Errors") is short. An execution error makes its response position null. If that position is Non-Null, "the execution error is further propagated to its parent". "If a List type wraps a Non-Null type, and one of the … elements of that list resolves to {null}, then the entire list … must resolve to {null}". If every position up to the root is Non-Null, data itself becomes null. The Apollo Router applies the same rules to the merged response against the supergraph: a fetch that fails for an entity nulls the fields it owed, and then the nulls bubble. Router issues #1930 and #1308 are users discovering this the hard way. Take the query planner part's schema and make one "harmless" change, boxart(size: ArtworkSize!): Artwork!, because every tile always has art:
Response shape (illustrative; error paths and counts vary by router version)
{
"data": { "me": { "avatarUrl": "…", "language": "en", "entitlement": { … },
"homePage": null } },
"errors": [ { "message": "Subgraph errors redacted",
"path": ["me", "homePage", "rows", 0, "videos", 0, "boxart"] } ]
}The BFF served default artwork and a full page. The graph, with one !, serves a header and a blank screen. Propagation doesn't add errors of its own ("only one error should be added to the errors list per response position"). So the errors point at …boxart, while the damage shows up at homePage, three levels higher. By default the Router also replaces the message with "Subgraph errors redacted" unless include_subgraph_errors is set. The client gets a terse error pointing at the wrong place. With the query planner part's actual schema (boxart: Artwork), the same timeout nulls every boxart field on the page (up to 40 × 75 = 3,000 at the published bounds) and nothing else, and the TV draws title text on plain tiles. That's the same degradation the table in the Netflix Architecture guide's One Press of Play part promises. The difference is one character.
The rule that falls out of this: a field may be Non-Null only if it is resolved in the same fetch as its parent.
Row.videoscan be[Video!]!because personalization produces the list and the video ids together.Video.boxartcrosses into the image subgraph, a separate_entitiesfetch with its own failure domain, so it has to be nullable. A!across a subgraph boundary chains the parent's availability to the child subgraph's.
The per-screen decision moves to the client
In the BFF, the TV could treat continue-watching as optional while the phone treated it as required. Nullability in the schema is one decision for every client. Per-screen "required" now has to live in the client operation. Relay's @required(action: NONE | LOG | THROW) bubbles a null to the nearest nullable parent on the client, for that screen only. The spec-level versions are still proposals: the Nullability WG's onError / error-behavior work (PROPAGATE, NULL, HALT; graphql-spec PR #1163) and Semantic Nullability (RFC tracker: "RFC 0 / Strawman"). The earlier Client Controlled Nullability RFC was closed as superseded. Don't design around any of them in 2026.
Every Hystrix component, re-homed
| Hystrix (Netflix Architecture guide) | After federation | Gap |
|---|---|---|
| Timeout (default 1,000 ms per command) | Router per-subgraph timeout, plus each subgraph's timeouts on its own dependencies | Router default is 30 s. Left alone, one slow subgraph holds the whole response for 30 s. |
| Bulkhead (thread pool per dependency) | Async I/O in the router; thread or semaphore pools inside each subgraph | No per-subgraph pool in the router. A slow subgraph costs open requests and memory instead of threads. |
| Circuit breaker | Inside subgraphs, around their own dependencies | The router's traffic-shaping docs list timeouts, rate limits and dedupe, but no breaker. A dead subgraph gets asked on every request until it times out. |
| Fallback value | Subgraph (for its own dependencies) or client (for the subgraph) | Nothing substitutes for a whole missing subgraph. |
| Request cache / collapser | Planner + Router key dedupe + DataLoader (see What GraphQL changes, The query planner) | Scope is per fetch, not per request |
| Turbine dashboards, fallback-rate alerts | Error codes per path, emitted as metrics | Netflix Studio: "almost every response is a 200 with custom errors in the error block. We introspect these custom error codes … and emit them to … Atlas." |
Auth: Authentication Centralises, Authorization Moves to the Owner
Netflix's Part 2 post describes the before state bluntly: "Some teams implemented authorization in their BFFs, some in microservices, and others did both for good measure. The result was often a different authorization story for a given piece of data depending on which UI a user was accessing it through." In Studio Edge, "we delegated the authorization responsibility to DGS owners", using DGS's @Secured annotation, and the gateway accepts "only trusted authenticated callers". This is the organizing line working as intended. Who may see an entitlement is a property of the entity, not the screen, so the BFF was the wrong home for it all along.
Apollo's Router also offers @authenticated, @requiresScopes and @policy (see Federation's model). The Router removes unauthorized fields before planning and "returns null for unauthorized fields and applies the standard GraphQL null propagation rules", with error code UNAUTHORIZED_FIELD_OR_TYPE, unless authorization.directives.reject_unauthorized is set. So an auth decision on a Non-Null field bubbles exactly like an outage does. Put @requiresScopes only on nullable fields.
What Belonged to Neither
These jobs sat in the BFF only because the BFF was the one place that saw the whole request. They aren't screen logic and they aren't entity logic, and a migration that sorts everything into "client or subgraph" drops them.
| A/B cell assignment | The BFF looked up the member's test cells once and branched on them. In the graph, personalization, image and catalog may each be under test. The cell set has to become request context resolved once at the edge and propagated, or every subgraph calls the allocation service on its own (the default-cell fallback from the Netflix Architecture guide's Personalization part, now in N places). |
|---|---|
| Old-client shims | The BFF translated new backend shapes into what a 2019 TV firmware expects. The graph has no version switch. Deprecated fields have to stay until usage reaches zero (see Schema governance), and whole-shape translation needs a thin adapter in front of the router. |
| Cross-subgraph writes | "Add to My List and refresh the row" was one BFF handler. In the graph, each mutation root field runs in one subgraph. Top-level mutation fields run serially, but nothing makes two subgraphs' writes atomic. |
| "Is this page good enough?" | The BFF could decide that four degraded rows is still a page. Now no tier sees the whole degraded response except the client. The Netflix guide's "alert on fallback rate" becomes a client-side or router-telemetry metric that someone has to own explicitly. |
The Invariants
- Guarantees: A failed or timed-out subgraph fetch produces a spec-defined partial response. The fields that fetch owed are
null, an error names thepath, and the null stops at the nearest nullable ancestor. Authorization lives with the data's owner, so it is consistent across every client. Every data-shape device decision is visible in the operation text. - Does not guarantee: A substitute value for a failed subgraph. The router has no fallback, breaker or bulkhead per subgraph. It doesn't guarantee per-screen required/optional semantics (nullability is global), or that a Non-Null field won't turn a partial outage into an empty page. Nor does it give you a place for A/B context, old-client translation or cross-subgraph atomicity unless you design one.