DataLoader
Batch and cache data requests to reduce N+1 queries in GraphQL and APIs.
State and data fetching npm MIT
How DataLoader is used
DataLoader joined the catalog on its public numbers (7,633,569 downloads a week on npm and 13,386 GitHub stars), not on our project count: it is a dependency in 5 public GitHub projects of our scan, 4 of them set up for AI coding agents. Projects that use it most often also use GraphQL.js (100.0%), dotenv (80.0%), Husky (80.0%).
DataLoader popularity over time
Gid Score 53: downloads 83, use in agent projects 7, GitHub stars 55, downloads trend 58 (each 0-100). How it is calculated.
Often used with DataLoader
| GraphQL.js | 100.0% of DataLoader projects · 159.2× more than average |
|---|---|
| dotenv | 80.0% of DataLoader projects · 5.1× more than average |
| Husky | 80.0% of DataLoader projects · 7.8× more than average |
| ioredis | 80.0% of DataLoader projects · 49.7× more than average |
| Prettier | 80.0% of DataLoader projects · 3.8× more than average |
| Apollo Client | 60.0% of DataLoader projects · 232.8× more than average |
| SWC | 60.0% of DataLoader projects · 34.8× more than average |
| GraphQL Scalars | 60.0% of DataLoader projects · 1241.6× more than average |
Install
| Package | npm install dataloader |
|---|---|
| Main stacks | TypeScript / JavaScript (3), Rust (1), Next.js (1) |
| Example projects | cofacts/rumors-line-bot, alkem-io/server, JesusFilm/core |
Alternatives to DataLoader
In our scan, none of the most used tools in State and data fetching does the same job as DataLoader: they are add-ons, companions or tools for a different task.
More in State and data fetching: TanStack Query Zustand RxJS Pinia SWR nuqs Immer React Redux