dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

feature: ReactiveArgumentResolver

Open esfomeado opened this issue 2 years ago • 4 comments

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

esfomeado avatar Oct 07 '22 14:10 esfomeado

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.

srinivasankavitha avatar Oct 07 '22 16:10 srinivasankavitha

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.

pavandv avatar Mar 04 '24 06:03 pavandv

Hi @srinivasankavitha, do you have any update on this?

pavandv avatar Mar 08 '24 19:03 pavandv

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.

srinivasankavitha avatar Mar 08 '24 19:03 srinivasankavitha