QUERY_TOO_COMPLEX
The GraphQL query exceeds the complexity budget.
400 Bad Request · GraphQL
Unlike the REST codes, this one travels in the GraphQL error envelope: errors[].extensions.code.
Example
{
"errors": [
{
"message": "Query complexity 200000 exceeds the maximum of 5000. Reduce page sizes, nesting or aliased list fields.",
"extensions": { "code": "QUERY_TOO_COMPLEX" }
}
]
}When it happens
The document's estimated cost — page sizes multiplied through nested and aliased list fields, computed with the request's real variable values — exceeds the server's complexity budget. The request is rejected before any resolver runs.
How to fix it
Ask for less per request: smaller limits, fewer nesting levels, fewer aliased list fields. Page through results with cursors instead of widening one query.