For the latest stable version, please use Spring GraphQL 1.3.3!spring-doc.cn

Security

The path to a Web GraphQL endpoint can be secured with HTTP URL security to ensure that only authenticated users can access it. This does not, however, differentiate among different GraphQL requests on such a shared endpoint on a single URL.spring-doc.cn

To apply more fine-grained security, add Spring Security annotations such as @PreAuthorize or @Secured to service methods involved in fetching specific parts of the GraphQL response. This should work due to Context Propagation that aims to make Security, and other context, available at the data fetching level.spring-doc.cn

The 1.0.x branch of this repository contains samples for Spring MVC and for WebFlux.spring-doc.cn