MappedBatchLoaders in 6.x? (replacing DataLoaderFactory.newMappedDataLoader from 5.x) #1454
-
In our SpringBoot application running 5.x of class MyDataLoader() : KotlinDataLoader<K, V> {
override val dataLoaderName = "MyDataLoader"
override fun getDataLoader() : DataLoader<K, V> =
DataLoaderFactory.newMappedDataLoader(/* ... */)
} In 6.x How would I register mapped batch loaders in 6.x? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Don't remember the exact reason for change but it looks like it was a miss on our side. |
Beta Was this translation helpful? Give feedback.
-
Hello, there are a couple of reasons why we changed the
about point 1 a PR in graphql-java-dataloader was merged to natively support what we where doing to the so we can theorically go back to previous ill work on that. BTW @terminalnode if you are relying on DataLoaders i would like to encourage you to take a look at we added support for usage of dataloaders by multiple graphql operations (a batched request) and dispatch the registry using an async execution exhaustion strategy -- this may help you to optimize your resolvers/data fetchers |
Beta Was this translation helpful? Give feedback.
Hello, there are a couple of reasons why we changed the
KotlinDataLoader
to allow passing theBatchLoader
fn instead of theDataLoader
instance:DataLoader
CacheMap
before instantiating theDataLoader
.about point 1 a PR in graphql-java-dataloader was merged to natively support what we where doing to the
CacheMap
so we can theorically go back to previous
KotlinDataLoader
implementation.ill work on that.
BTW @terminalnode if you are relying on DataLoaders i would like to encourage you to take a look at
https://ope…