Skip to content

Dispatch loaders registered without a predicate - #2362

Open
jjacobs44 wants to merge 2 commits into
masterfrom
fix/2358-batchloaderregistry-dispatch
Open

jjacobs44 wants to merge 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
…2358)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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