All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.javalin.plugin.graphql.server.JavalinDataLoaderRegistryFactory.kt Maven / Gradle / Ivy

There is a newer version: 4.6.8
Show newest version
package io.javalin.plugin.graphql.server

import com.expediagroup.graphql.server.execution.DataLoaderRegistryFactory
import com.expediagroup.graphql.server.execution.KotlinDataLoader
import org.dataloader.DataLoaderRegistry

class JavalinDataLoaderRegistryFactory(private val dataLoaders: List>): DataLoaderRegistryFactory {
    override fun generate(): DataLoaderRegistry {
        val registry = DataLoaderRegistry()
        dataLoaders.forEach { registry.register(it.dataLoaderName, it.getDataLoader()) }
        return registry
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy