query depth and cost limits
Limits a GraphQL server places on how deeply nested or how expensive a single query may be.
An unlimited query can take the service down.
In more detail
Without them one query can ask for an enormous tree of related data and exhaust the server. Servers usually reject a query whose depth or estimated cost exceeds the limit before running it.
Related terms
- GraphQL — A query language and runtime for APIs in which the client sends a query to one endpoint and names exactly the fields it wants from a typed graph of data.
- resource exhaustion — Running a service out of memory, time, connections or money by making it do unbounded work, whether by accident or on purpose.
Taught in
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC