dgs-framework
dgs-framework copied to clipboard
feature: ReactiveArgumentResolver
Describe the Feature Request
As of now is only possible to resolve non reactive arguments using the ArgumentResolver
interface.
Will be cool to be able to resolve as well some reactive arguments for instance to get a claim from the token using the ReactiveSecurityContextHolder.getContext()
.
Describe Preferred Solution
Have a ReactiveArgumentResolver
interface or some other approach to would enable to return Mono<Object> on an ArgumentResolver
.
Describe Alternatives
Thanks for opening the issue. We have some basic reactive support but haven't yet fully explored all the aspects required to make it first-class in the framework. This is primarily due to the fact that we haven't widely adopted it internally. It's great to get an idea of all the existing gaps so we can prioritize for future.
One requirement is to use the @authenticationprincipal
in the @dgsDataFetcher
so we can access the Principal object.
I think this is the biggest requirement for anyone who wants to use Reactive Dgs.
Hi @srinivasankavitha, do you have any update on this?
We won't be prioritizing this feature for now, since we don't use reactive stack internally. However, we are working on a release that integrates with spring-graphql in the coming weeks. With that, perhaps I am expecting you should be able leverage the support that is available for reactive stack from spring-graphql.