Two GraphQL requests can have similar sizes while creating very different work for the server. One might retrieve a profile. Another might traverse several relationships and return many records at each level. Counting requests alone does not measure that difference.
Availability controls need to account for the operations behind the query. The same review also has to verify authorization at the objects and fields those operations return.
Depth is only one part of cost
OWASP's GraphQL guidance discusses query complexity, depth limits, timeouts, rate limiting, and batching considerations. These mechanisms address different ways a request can expand server work. The GraphQL security guidance describes the available controls.
A dashboard query might return projects, their tasks, and every task’s comments. It can produce a large result without deep nesting. Test list sizes, aliases, and multiple operations as well as depth.
Establish a workload budget
Define supported pagination sizes, maximum concurrent work, and limits for expensive fields. A cost model can assign different weights to operations that trigger database scans, external calls, or computation. The model needs to reflect the implementation rather than only the number of visible fields.
Record where enforcement happens. Rejecting a query before resolver execution has different resource implications from allowing it to run until a timeout. A timeout also needs cancellation behavior so abandoned queries do not continue consuming downstream capacity indefinitely.
Test representative expansion patterns
Use synthetic data and a dedicated environment with explicit resource limits. Compare a normal dashboard query with controlled increases in depth, list size, aliases, and batching. Measure resolver calls, database work, latency, and rejection behavior. Avoid unrestricted load tests against production.
Then run a normal query from a second test tenant while the first reaches its limit. This checks whether one customer's workload affects another's expected service. A per-request cap may still permit excessive aggregate work across many concurrent requests.
Keep authorization in the same review
Resolver reuse can make a field accessible through several query paths. Test whether each path applies the same object and field permissions. Disabling introspection or obscuring field names does not establish authorization; a caller who knows the schema can still request the operation.
Report the enforced limits, tested expansion patterns, and inconsistent permission checks. Confirm that normal customer queries fit within the measured budget. Review the cost assumptions again when resolvers, data volumes, or external integrations change.
Sources
GraphQL: Security. The customer dashboard and workload measurements are illustrative.