-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable use of Kotlin Flow as return value #954
Comments
Also need to enable |
@hantsy batch data loader already works with registry.forName<UUID, Merchant>("merchantDataLoader").registerMappedBatchLoader { merchantIds, _ ->
mono {
merchantService.findAllById(merchantIds).associateBy { it.id }
}
} Or for a method returning a flow, it can be returned as registry.forName<UUID, Merchant>("merchantDataLoader").registerBatchLoader { merchantIds, _ ->
merchantService.findAllById(merchantIds).asFlux()
} |
|
I tried to update my example project to use @QueryMapping
fun allPosts(): Flow<Post> = postService.allPosts()// remove .toList() to return Flow type directly But run the following tests in the
And I got the error The example project here: https://github.com/hantsy/spring-graphql-sample/tree/master/spring-graphql-rsocket-kotlin-co |
@hantsy is your |
Created an new issue for this. |
Using
ReactiveAdapterRegistry
when handling return values from annotated controller methods such as@SchemaMapping
,@BatchMapping
, and@GraphQlExceptionHandler
would enable use of Kotlin'sFlow
.The text was updated successfully, but these errors were encountered: