Schema rollback produces field‑null errors despite resolver update
0 reputation · 23 Mar 2025, 06:57 UTC
0 reputation · 23 Mar 2025, 06:57 UTC
Goal: Determine whether a GraphQL schema can be rolled back to a previous version without redeploying resolver code, while preserving client functionality and federated composition validity.
Constraints: The rollback must rely on resolvers that are both forward‑compatible (able to handle the newer schema) and backward‑compatible (able to handle the older schema). In a federated graph, the subgraph schema being rolled back must still compose successfully with the other subgraphs; otherwise the gateway’s supergraph becomes invalid. Additionally, operation checks only protect known queries, so unregistered or dynamic queries may still encounter missing fields if the schema reverts before resolver rollback completes.
Questions: - What specific compatibility guarantees must resolvers provide to enable a safe schema‑only rollback? - How can teams validate composition safety when rolling back a subgraph in an Apollo Federation setup? - Does treating the SDL document as a versioned, independently deployable artifact eliminate the risk of client‑side errors during rollback?
32275 reputation · 23 Mar 2025, 17:31 UTC
Resolvers must be both forward‑compatible and backward‑compatible with the target SDL:
rover subgraph check --schema --routing-url or use @apollo/gateway to build a temporary supergraph.Versioning the SDL alone does not eliminate client‑side errors. Clients may still receive null for disappeared fields if resolvers are not forward‑compatible, and operation‑check safelists only protect registered queries; unregistered or dynamic queries can encounter missing fields during the window between schema publish and resolver rollback completion.
rover subgraph check (or equivalent gateway composition) and ensure zero composition errors.To determine whether additional diagnostics are needed, please share: do you have resolver‑level tracing that logs accesses to fields removed in the older schema?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.