DataLoader registrations via BatchLoaderRegistry not used at runtime #1020
Labels
status: backported
An issue that has been backported to maintenance branches
type: regression
A bug that is also a regression
Milestone
Since version 1.3. we have detected a strange behavior.
We are using the
BatchLoaderRegistry
to register DataLoaders. We write some of them and some are generated using the graphql-maven-plugin.Example of a DataLoader registration:
After upgrading to
1.3.X
we have experienced behavior, that during runtime, there are no DataLoaders available. We were able to inspect this a little bit further and find a workaround. We have detected that on application startup, theBatchLoaderRegistry
is invoked and there is a check, if some DataLoaders are configured. However, at this time, there are none of them, because the Controllers were not initialized.Example exception:
The workaround is to provide a custom Bean for the
BatchLoaderRegistry
and to initialize it with some data loaders.Is this expected behavior or is this a bug?
The text was updated successfully, but these errors were encountered: