[ ] Consider creating a discussion on the discussion forum
first
[x] Make sure the PR doesn't introduce backward compatibility issues
[x] Make sure to have sufficient test cases
Pull Request type
[x] Bugfix
Changes in this PR
When DgsDataLoader is declared as DgsDataLoaderRegistryConsumer and micrometer wrapper is on. Then batchLoader is DgsDataLoaderRegistryConsumer condition willl not work beacuse MappedBatchLoaderWithContextInstrumentationDriver is not DgsDataLoaderRegistryConsumer
Alternatives considered:
I see two viable solutions, first - the one that is in this pull request. This solution isn't the most beautiful but it works
Second - make interface DataLoaderProxy with one method fun getOriginal(): DataLoader. With that we can always get the original dataloader within DgsDataLoaderProvider and setup Registry there
Pull request checklist
Pull Request type
Changes in this PR
When DgsDataLoader is declared as DgsDataLoaderRegistryConsumer and micrometer wrapper is on. Then
batchLoader is DgsDataLoaderRegistryConsumer
condition willl not work beacuse MappedBatchLoaderWithContextInstrumentationDriver is not DgsDataLoaderRegistryConsumerAlternatives considered:
I see two viable solutions, first - the one that is in this pull request. This solution isn't the most beautiful but it works Second - make interface DataLoaderProxy with one method
fun getOriginal(): DataLoader
. With that we can always get the original dataloader within DgsDataLoaderProvider and setup Registry there