Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid changing default DataLoaderRegistry when there are no registrations #915

Closed
rstoyanchev opened this issue Feb 20, 2024 · 0 comments
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

We replace the DataLoaderDispatcherInstrumentationState.EMPTY_DATALOADER_REGISTRY instance with a new instance if we have anything to register as the empty one rejects registrations. If the registry remains empty, however, it can lead to side effects like for example graphql-java/graphql-java#3456.

It appears the check is imperfect. As it is we only look check if we have any DataLoaderRegistrars configured, but not whether they are themselves empty or not. Boot declares a BatchLoaderRegistry bean and always passes it in, so there is always at least one registrar, but that may be empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant