Does anyone know how to return Flux types in graph...
# graphql-kotlin
t
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
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
You can use flux return type for subscriptions
t
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
instead of
toFuture()
extension use
await()
to just return list of entities