Allow ValueCache to work with Publisher DataLoader by AlexandreCarlton · Pull Request #172 · graphql-java/java-dataloader

added 2 commits

January 1, 2025 22:04
We parameterise:

 - `DataLoaderValueCacheTest`
 - `ScheduledDataLoaderRegistryTest`

to provide increased coverage across all DataLoader implementations.

Notably, `DataLoaderValueCacheTest` is _not_ parameterised across the
Publisher DataLoaders (yet) as these do not appear to work when a
`ValueCache` is provided (which is what prompted this pull request). It
will be fixed in a future pull request, at which point we will restore
coverage.
We resolve two bugs in the interaction between Publisher `DataLoader`s
and `ValueCache`s:

- if the value was cached, we complete the corresponding queued futures
  immediately.
- if the value was _not_ cached, we remember to provide the queued future
  to the invoker so that the future can eventually be completed.

bbakerman

bbakerman

AlexandreCarlton

bbakerman