Open ojongerius opened 6 years ago
Closing for now.
Reopening this, it's not too complicated to get in and will really help offload the database.
Note to self: article with examples of dataloader and Mongo at http://www.petecorey.com/blog/2017/08/14/batching-graphql-queries-with-dataloader/
Like #89 this makes sense when we have have types that refer to each other.
Busy getting my learn on, but wanted to save a link to this video by MPJ on dataloader
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.