how to make a specific GraphQL query as public API in spring boot security?
In REST API, we can specify the URL as public like the following code
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return web -> web.ignoring().requestMatchers(CorsUtils::isPreFlightRequest)
.antMatchers("/actuator/**", "/graphiql/**", "/voyager/**", "/vendor/**");
}
How to do the same for specific GraphQL query
or mutation
,
query {
listEmployee(){
id
}
}