Skip to content

3.1.0

Compare
Choose a tag to compare
@bbakerman bbakerman released this 11 Aug 02:21
· 131 commits to master since this release
8836d7e

ValueCache is called in batch function

The 3.x version of DataLoader added a long wanted feature. The ability to have an external cache of values.

It was rightly made an async operation to get cache entries.

However we got the code design wrong and called the caching during the dataLoader.load() calls and this broke the implied contract between loading N keys and being in a position to dispatch the batch loader and retrive N keys in batch.

This release fixes that - it moves the async caching get to the batch function itself, which is truly async.

This had a side benefit as well. The ValueCache now has a getValues(List<K> keys) method that allows a batch worth of keys to checked at once. External systems sucha s REDIS have multiple GET APIs and hence the caching can be even more efficient

graphql-java will now be able to update to this version in order to use the modern data loader with external value caching.