This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class ResourceResolver implements GraphQLQueryResolver { | |
public String securedResource() { | |
return "Secured resource"; | |
} | |
@PreAuthorize("hasRole('ROLE_ADMIN')") | |
public String securedResourceAdmin() { | |
return "Secured resource Admin"; | |
} |