Course lesson

Batch Database Requests with a GraphQL API

Querying a thousand posts doesn't have to mean a thousand individual database requests.

Duration
2 min
Access
Included
Transcript
Retained from source evidence

Querying a thousand posts doesn't have to mean a thousand individual database requests.

We're going to build a batching layer that adds a millisecond pause into each resolver while it gathers all the required post IDs and then fetches them in a single request