RTS questionnaire · Q11 · GraphQL proof

Have you worked with GraphQL? If yes, for how long and in what context?

A runnable review of the GraphQL decisions behind the answer: the schema as a contract, batching in the resolvers, the limits that protect the database, and how errors and subscriptions behave.

Status: reviewed Live GraphQL workflow GraphQL · SDL · DataLoader Jump to live proof ↓

11. GraphQL: experience and context

Answer as submitted

“Yes — ~4 years: schema design, resolvers, DataLoader, subscriptions, federation.”
Technical decision: expand. The submitted line lists the topics but not the engineering behind them. This page is the separate, detailed version: it shows the schema contract, how the resolvers avoid N+1, and which limits keep arbitrary client queries from harming the database.

Expanded answer

Yes — roughly four years, mainly in enterprise back ends where a single endpoint has to serve several clients. That work covers schema-first SDL (types, interfaces, enums, input objects, cursor/Relay-style connections and explicit nullability) as well as code-first definitions in C# (Hot Chocolate / GraphQL.NET style) and Python (Strawberry / Ariadne style); resolvers with request-scoped context and DataLoader batching; execution governance with depth, cost and persisted-query allow-lists; subscriptions over WebSocket for change notifications; and per-field tracing so the slowest resolver is identified from data rather than guessed.

DecisionTypical implementationWhy it is done this way
Schema as contractSDL with explicit nullabilityClients can only request what the model allows, and breaking changes are caught in CI.
Paginationcursor connections, never unbounded listsA large list cannot be requested in one query by accident.
N+1 preventionDataLoader, batched per requestA nested selection costs a fixed number of queries, not one per row.
Execution limitsdepth + cost analysis + allow-listAn expensive or unexpected operation is rejected before it reaches the database.
Error contractuserErrors in the payload, codes in extensionsPartial success is explicit and the client can degrade one field.
Live updatessubscriptions over WebSocketOnly what changed is pushed, instead of clients polling.
Observabilityper-field tracing, trace id per operationOptimisation targets the resolver that actually owns the latency.

Live GraphQL workflow proof

The running component below changes its operation/result view through real event binding. Select a step to see the schema or runtime decision, the reasoning behind it, and the measurement that proves it.

LIVE PREVIEW
RUNNING
GRAPHQL WORKFLOWRUNNING

Choose a GraphQL step

Select a step to inspect the decision, the reasoning and the measured result.

$ type Order { id: ID! lines: [OrderLine!]! } · query { orders(first: 20, after: $cursor) { … } }

The schema is the contract: types, nullability and cursor pagination are designed before the resolvers, so a client can only ask for what the model allows.

SDL 412 lines  ·  breaking-change check in CI
nullable fields reviewed per query

How the API is kept predictable

Rules I apply. Design the schema before the resolvers and treat it as a published contract; paginate every list; batch every relationship through a request-scoped loader; cap depth and cost and allow-list operations in production; report domain failures as typed payload errors instead of exceptions; and trace per field so the slow resolver is found with evidence. GraphQL gives the client flexibility, and those rules are what keep that flexibility from becoming a liability.
Boundary for Q11: this page covers schema design and execution behaviour. Federation topology across many teams, gateway-level caching strategy and client-side cache normalisation are separate topics.

Source files

Select a file to inspect the proof with syntax highlighting and line numbers. The first file is the code running the component above; the other two are the production shapes of the same decisions.

Acceptance criteria