apollo-datasource-mongodb
apollo-datasource-mongodb copied to clipboard
Deduplicate cache.set
Currently if a request triggers N findOneById(123) calls (all with the same id), and the cache is empty, there will be N calls to cache.set(123, doc). It would be nice if we could deduplicate that, like DataLoader memoizes .load
@lorensr do you have any guidance on how this change could be implemented?
Not sure, but happy to look at pseudocode or a PR