API / Apollo Gateway Interview questions
How does Apollo Gateway handle errors returned by subgraphs?
Subgraph-level GraphQL errors get propagated into the top-level errors array of the gateway's response, but with the path rewritten to reflect where that field sits in the client's original query — not the internal subgraph request the gateway happened to send.
Field values follow normal GraphQL null-propagation: a failed nullable field is set to null alongside its error entry; a failed non-nullable field nulls its nearest nullable ancestor instead, which can null out a larger part of the response.
Transport-level failures — a subgraph returning a 5xx, timing out, or refusing the connection — are converted into a generic GraphQL error for the fields that depended on that subgraph, rather than surfacing as an opaque HTTP failure to the client. Both Gateway and Router also enforce a per-subgraph fetch timeout precisely so that one unresponsive service degrades gracefully instead of hanging the whole request.
More Related questions...