graphql.nadel.enginekt.transform.query.NadelQueryTransformerJavaCompat.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nadel-engine-nextgen Show documentation
Show all versions of nadel-engine-nextgen Show documentation
Nadel is a Java library that combines multiple GrahpQL services together into one API.
The newest version!
package graphql.nadel.enginekt.transform.query
import graphql.normalized.ExecutableNormalizedField
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.future.future
import java.util.concurrent.CompletableFuture
class NadelQueryTransformerJavaCompat(
private val queryTransformer: NadelQueryTransformer,
private val coroutineScope: CoroutineScope,
) {
fun transform(
fields: List,
): CompletableFuture> {
return coroutineScope.future {
queryTransformer.transform(fields)
}
}
fun transform(
field: ExecutableNormalizedField,
): CompletableFuture> {
return coroutineScope.future {
queryTransformer.transform(field)
}
}
}