Skip to content

MappedBatchLoaders in 6.x? (replacing DataLoaderFactory.newMappedDataLoader from 5.x) #1457

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

Closed
samuelAndalon opened this issue Jun 9, 2022 Discussed in #1454 · 0 comments
Assignees

Comments

@samuelAndalon
Copy link
Contributor

Discussed in #1454

Originally posted by terminalnode June 8, 2022
In our SpringBoot application running 5.x of graphql-kotlin-spring-server (and related libraries) we make heavy use of mapped data loaders using this pattern:

class MyDataLoader() : KotlinDataLoader<K, V> {
  override val dataLoaderName = "MyDataLoader"
  override fun getDataLoader() : DataLoader<K, V> =
    DataLoaderFactory.newMappedDataLoader(/* ... */)
}

In 6.x getDataLoader has been replaced with getBatchLoader which is supposed to return a BatchLoader<K, V>. There is MappedBatchLoader<K, V>, but that's not a BatchLoader.

How would I register mapped batch loaders in 6.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant