apollo-connector-mongodb icon indicating copy to clipboard operation
apollo-connector-mongodb copied to clipboard

Shouldnt DataLoaders only exist for the request length?

Open mikecann opened this issue 6 years ago • 0 comments

I am just reading up on DataLoaders and in the readme (https://github.com/graphql/dataloader) it mentions:

Avoid multiple requests from different users using the DataLoader instance, which could result in cached data incorrectly appearing in each request. Typically, DataLoader instances are created when a Request begins, and are not used once the Request ends.

As far as I can tell however, this lib seems to have Entities and thus the DataLoaders within them hang around for the lifetime of the application? Does this mean that that this then becomes an application level cache? What happens if you have more than one web server?

mikecann avatar May 20 '19 03:05 mikecann