Releases: graphql-java/java-dataloader
3.3.0
What's Changed
- Pre-size resulting lists by @dfa1 in #142
- Minor javadoc fixes by @dfa1 in #141
- Shuts down executor if its was auto added by our code by @bbakerman in #144
- If there is a specific predicate for a dataloader - its is the final say on whether to dispatch by @bbakerman in #145
Full Changelog: v3.2.2...v3.3.0
3.2.2
What's Changed
A series of small fixes to make the code more efficient
- Lazily initialize Executor in ScheduledDataLoaderRegistry builder by @kilink in #135
- Avoid allocations in DataLoaderHelper.dispatch when there's no work by @kilink in #136
New Contributors
Full Changelog: v3.2.1...v3.2.2
3.2.1
New ticker mode
There is a new mode in ScheduledDataLoaderRegistry
called ticker mode that will continue to tick away and allow for chained data loader calls. See the readme for more details.
ScheduledDataLoaderRegistry registry = ScheduledDataLoaderRegistry.newScheduledRegistry()
.register("a", dataLoaderA)
.register("b", dataLoaderB)
.scheduledExecutorService(executorService)
.schedule(Duration.ofMillis(10))
.tickerMode(true) // ticker mode is on
.build();
CompletableFuture<Object> chainedCalls = dataLoaderA.load("user1")
.thenCompose(userAsKey -> dataLoaderB.load(userAsKey));
Predicates per dataloader in ScheduledDataLoaderRegistry
ScheduledDataLoaderRegistry
now has the capability to have a predicate per data loader specified as well as an overall one. This allows you to have fine control on when dataloaders get dispatched.
What's Changed
- Try.getThrowable - fixed incorrect exception message by @rstata in #122
- Prepend 0.0.0 to build version by @dondonz in #126
- Batch scheduler function support by @bbakerman in #128
- Adds a predicate to DataLoaderRegistry and a per dataloader map of pedicates is also possible by @bbakerman in #133
- Ticker mode on ScheduledDataLoaderRegistry by @bbakerman in #131
New Contributors
Full Changelog: v3.2.0...v3.2.1
3.2.0
What's Changed
- Add context objects to StatisticsCollector methods by @AlexandreCarlton in #120
- Copy across valueCache in DataLoaderOptions copy constructor by @AlexandreCarlton in #121
New Contributors
- @AlexandreCarlton made their first contribution in #120
Full Changelog: v3.1.4...v3.2.0
3.1.4
3.1.3
What's Changed
- Configure Manifest task to create valid OSGi bundle by @Lana11s in #113
- Make NoOpStatisticsCollector to be default StatisticsCollector by @dugenkui03 in #112
- feat: make cache map values accesible for read only purposes by @samuelAndalon in #115
New Contributors
- @Lana11s made their first contribution in #113
- @samuelAndalon made their first contribution in #115
Full Changelog: v3.1.2...vv3.1.3
3.1.2
3.1.1
3.1.0
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.