https://kotlinlang.org logo
#graphql-kotlin
Title
# graphql-kotlin
t

Tianyu Zhan

03/01/2021, 10:31 PM
Does anyone know how to return Flux types in graphql? For now I called an API and got the Flux type object. I want to return that object for graphql query. But it seems not support Flux type....
s

Shane Myrick

03/01/2021, 10:35 PM
We do not support Flux out of the box, as that is a streaming publishing and queries and mutations should return a single value for one request However you can add custom support through the schema generator hooks https://expediagroup.github.io/graphql-kotlin/docs/schema-generator/execution/async-models
d

Dariusz Kuc

03/01/2021, 11:16 PM
You can use flux return type for subscriptions
t

Tianyu Zhan

03/03/2021, 5:12 PM
Is it possible if I convert the Mono<List<>> objects to CompletableFuture<List<>> and return to the query?
But it does not work either. i don't know the reason
d

Dariusz Kuc

03/03/2021, 6:07 PM
instead of
toFuture()
extension use
await()
to just return list of entities
20 Views