SpringBoot GraphQL request execution timeout issue

Viewed 1317

I have used Spring boot with graphQL (version 11.1.0) and it's working fine but it throws a timeout error when request execution time exceeds the 30s.

Error:

GraphQL execution canceled because timeout of 30000 millis was reached. The following query was being executed when this happened:
// query
Cannot write GraphQL response, because the HTTP response is already committed. It most likely timed out.

Can anyone tell me how can we configure timeout in graphQL?

1 Answers

It is possible to set the timeout using the graphql.servlet.async-timeout property in application.yml/application.properties.

Note that the value is in milliseconds. Default value is 30000 ms as you could see.

Related