DataLoader Batching
A per-request loader that queues individual `load(id)` calls during one tick of the event loop, fires a single batched `WHERE id IN (...)` fetch, and caches results — the standard fix for the N+1 problem the resolver chain naturally creates. Loaders must be per-request, or the cache leaks data across users.
This Concept is waiting for its first lesson!
A per-request loader that queues individual `load(id)` calls during one tick of the event loop, fires a single batched `WHERE id IN (...)` fetch, and caches results — the standard fix for the N+1 problem the resolver chain naturally creates. Loaders must be per-request, or the cache leaks data across users.
Are you a teacher? Sign in to start contributing.
Sign In