Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Use dataloader #38

Open
ojongerius opened this issue Apr 9, 2018 · 5 comments
Open

Use dataloader #38

ojongerius opened this issue Apr 9, 2018 · 5 comments

Comments

@ojongerius
Copy link
Contributor

ojongerius commented Apr 9, 2018

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
Copy link
Contributor Author

Closing for now.

@ojongerius
Copy link
Contributor Author

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

@ojongerius ojongerius changed the title Consider using dataloader Use dataloader Apr 17, 2018
@ojongerius
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@Bouncey
Copy link
Member

Bouncey commented May 3, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants