| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hello, this pull request has been inactive for 60 days, so we're marking it as stale. If you would like to continue working on this pull request, please make an update within the next 30 days, or we'll close the pull request. |
Sorry, something went wrong.
|
Hello, as this pull request has been inactive for 90 days, we're closing this pull request. We always welcome contributions, and if you would like to continue, please open a new pull request. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a demonstration patch stacked on top of #277. It addresses the BatchLoaderEnvironment semantic regression described in the requested-changes review.
Problem
#277 builds a BatchLoaderEnvironment before value-cache filtering. If a dispatch has a partial ValueCache hit, the actual batch loader is invoked only with the missed keys, but the environment can still describe the original full key/context list.
That breaks the existing invariant that environment.getKeyContextsList() is aligned with the keys argument received by a BatchLoaderWithContext.
Fix
When ValueCache filtering produces missedKeys, build a fresh BatchLoaderEnvironment from missedKeys and missedKeyContexts before invoking the concrete batch loader.
The actual fix is intentionally small:
GitHub line link:
https://github.com/graphql-java/java-dataloader/blob/fix-pr-277-value-cache-environment/src/main/java/org/dataloader/DataLoaderHelper.java#L483-L484
Test
Adds a regression test where:
The key test lines are:
GitHub line link:
https://github.com/graphql-java/java-dataloader/blob/fix-pr-277-value-cache-environment/src/test/java/org/dataloader/DataLoaderBatchLoaderEnvironmentTest.java#L221-L249
Verification