Using DataLoader with Apollo Server
n+1 Problem
The N+1 Antipattern In Short
The N+1 query antipattern happens when a query is executed for every result of a previous query. The query count is N + 1, with N being the number of queries for every result of the initial query. If that initial query has one result, N+1 = 2. If it has 1000 results, N+1 = 1001 queries.1
- dataloader can fetch from two different servers
- need to create one loader per relationship