Skip to content

Dispatch loaders registered without a predicate - #2362

Merged
jjacobs44 merged 2 commits into
masterfrom
fix/2358-batchloaderregistry-dispatch
Oct 26, 2026
Merged

jjacobs44 merged 2 commits into
masterfrom
fix/2358-batchloaderregistry-dispatch

Conversation

@jjacobs44

Copy link
Copy Markdown
Collaborator

Loaders registered through Spring GraphQL's BatchLoaderRegistry are never dispatched because the DGS registry defaults to DISPATCH_NEVER (fixes #2358).

jjacobs44 and others added 2 commits October 19, 2026 10:13
DefaultDgsDataLoaderProvider built its ScheduledDataLoaderRegistry with a
DISPATCH_NEVER default. That worked around java-dataloader 3.2.x OR-ing a
loader's own predicate with the registry default
(graphql-java/java-dataloader#138). Since 3.3.0 a loader's predicate is
final, and DGS registers every loader with one, so the default only
applied to loaders added by others, such as Spring GraphQL's
BatchLoaderRegistry. Those were never dispatched by dispatchAll() and hung
the query.

Drop the override so the registry uses java-dataloader's DISPATCH_ALWAYS
default.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@jjacobs44
jjacobs44 marked this pull request as ready for review October 19, 2026 17:19
@jjacobs44
jjacobs44 merged commit 3f656ab into master Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Loaders registered with Spring GraphQL's BatchLoaderRegistry are never dispatched

1 participant