graphql-java / java-dataloader

A Java 8 port of Facebook DataLoader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ReactiveStreams and Kotlin Coroutines variants for DataLoader

hantsy opened this issue · comments

Spring Graphql added an variant for the reactive/webflux implementations. I hope the upstream project can consider ReactiveStreams API(Publisher) and Kotlin Couroutines(suspend fun or Flow) as alternatives of the existing return type( Java 8 CompletionStage) of a BatchLoader or MappedBatchLoader.

We dont support it because it would bring in a an extra dependencies.

However a CompletableFuture can be turned back into a Mono or Flow easily enough