open-api icon indicating copy to clipboard operation
open-api copied to clipboard

Use dataloader

Open ojongerius opened this issue 7 years ago • 5 comments

Dataloader is a project from Facebook and allows removing pressure from the database: https://github.com/facebook/dataloader .

As per the README, it does not replace shared application level caches. It's meant to be used per request, and prevent multiple DB calls when one will do. See https://github.com/facebook/dataloader/blob/master/README.md.

Premature optimisation for now, but will come in handy when we are in need for performance improvements.

See https://github.com/withspectrum/spectrum/tree/alpha/api/loaders for a JS implementation.

ojongerius avatar Apr 09 '18 03:04 ojongerius

Closing for now.

ojongerius avatar Apr 09 '18 03:04 ojongerius

Reopening this, it's not too complicated to get in and will really help offload the database.

ojongerius avatar Apr 17 '18 02:04 ojongerius

Note to self: article with examples of dataloader and Mongo at http://www.petecorey.com/blog/2017/08/14/batching-graphql-queries-with-dataloader/

ojongerius avatar Apr 17 '18 03:04 ojongerius

Like #89 this makes sense when we have have types that refer to each other.

ojongerius avatar May 02 '18 03:05 ojongerius

Busy getting my learn on, but wanted to save a link to this video by MPJ on dataloader

Bouncey avatar May 03 '18 19:05 Bouncey