GraphQL resolver
The function a GraphQL server runs to produce the value of one field in a query.
In more detail
Because each field is resolved separately, a list query can trigger one lookup per item unless resolvers batch their data loading. Data loaders that collect the lookups of one request and fetch them together are the usual remedy.
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.
- N+1 query problem — A performance bug where code runs one query for a list and then one more query per item, so N items cost N+1 queries.
- batching — Doing many similar pieces of work together in one operation, such as loading all needed owners with one query instead of one query each.
Taught in
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC