Using org.springframework.boot:spring-boot-starter-graphql
and WebMvc, I have the following error while running the query:
Caused by: java.lang.IllegalStateException: Async support must be enabled on a servlet and for all filters involved in async request processing. This is done in Java code using the Servlet API or by adding "<async-supported>true</async-supported>" to servlet and filter declarations in web.xml.
async-supported
in Spring for the GraphQL endpoint?Asynchronous dispatch cannot be disabled with a simple property and it is not advised, as GraphQL Java uses the AsyncExecutionStrategy
by default. I'd say this is quite central in a GraphQL approach, where parts of the schema can be resolved from multiple sources (data stores, web APIs, etc) and the engine optimizes that.
If you're getting this error, this means you've configured a custom filter that is not configured for async support (and still mapped for ASYNC dispatch). In general, you should review your entire filters/Servlet/container arrangement to check for that. Ideally, you could start from a new https://start.spring.io and add custom filters and config one by one.