Skip to main content

Over-fetching

Over-fetching happens when more data is returned than is actually needed. This can occur between the client and the GraphQL schema, and/or between the schema and the backend data stores.

Symptoms

  • Large responses with many unused fields
  • Large serialization/deserialization/compression/decompression costs
  • Higher latency
  • High memory and CPU usage
  • Increased backend load
  • Cache bloat

Why it matters

Over-fetching makes the backend do more work than necessary, increasing hosting costs and response latency. It also consumes more memory and processing time on the client.

Practices that address this

Solutions that address this