Skip to main content

Result size limits

Limits the size of responses to avoid large payloads or expensive computation.

Practices implemented

Applies to

  • GraphQL servers
  • Gateways and proxies

Configuration (suggested defaults)

ParameterDefaultNotes
maxNodes5000Cap total nodes per response.
maxResponseBytes1_000_000Cap serialized response size.
enforcementrejectReject responses that exceed limits.

Implementation notes

  • Count nodes and bytes during execution.
  • Prefer per-field list limits via pagination defaults.
  • Return stable errors when limits are hit.

Cautions

  • Limits can surprise users if defaults are too low.
  • Counting bytes may require buffering.

Problems addressed