This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
forked from yandooo/graphql-spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 327
Webflux ClassCastException for Flux response type #325
Comments
I mentioned in #326 why I think it's not a good idea to write all Flux resolvers as subscriptions |
I switched to WebFlux recently. Previously GraphQL with Spring MVC was working fine. If I understand correctly, I have to do something like this
And then I have a Subscription service like this
But I keep getting this exception
Any ideas?? :( :( :( |
Maybe you didn't include graphql kickstart webflux dependency |
I have the dependencies as follows
|
Maybe you're using mvc and webflux, where mvc wins. See example project somewhere in this repository. Or my "bank" project in api module |
oliemansm
changed the title
Webflux ClassCastException
Webflux ClassCastException for Flux response type
Apr 5, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If a resolver has
Flux<...>
return type and schema has[...]
return type then it will crash on this line:com/graphql-java-kickstart/graphql-java-tools/5.7.1/graphql-java-tools-5.7.1-sources.jar!/com/coxautodev/graphql/tools/TypeClassMatcher.kt:78
It works if such query is actually a subscription of return type
...
and the resolver ofPublisher<...>
The text was updated successfully, but these errors were encountered: