'Passing ReactiveSecurityContext into GraphQL - How to enable Spring @PreAuthorize annotation for Reactive Resolvers

After I migrated to Reactive GraphQL, Spring ReactiveSecurityContext is not accessible in GraphQL. The question here is, how I can use Spring @PreAuthorize annotation in REACTIVE GraphQL Resolvers. I found some links like this one but I couldn't get this done.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source