3 ms·
You can disable caching if that's a problem for your application. But the idea is that DataLoader simply holds onto promises that requested an entity, and fires
by mixedCase 5y ago
You can disable caching if that's a problem for your application. But the idea is that DataLoader simply holds onto promises that requested an entity, and fires them all in batches according to a scheduler function. In Node.js, the default is to use scheduler magic (relies on how the event loop works).
- hnjobaccount 5y agoHere's a small article that explains how the dataloader pattern works under the hood https://www.mikealche.com/software-development/advanced-promises-in-javascript-building-a-simple-dataloader https://www.mikealche.com/software-development/advanced-prom...