SpringBoot GraphQL请求执行超时问题



我在graphQL(11.1.0版本(中使用了Spring引导,它运行良好,但当请求执行时间超过30秒时,它会抛出超时错误。

错误:

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.

有人能告诉我我们如何在graphQL中配置超时吗?

可以使用application.yml/application.properties中的graphql.servlet.async-timeout属性设置超时。

请注意,该值以毫秒为单位。如您所见,默认值为30000毫秒。

最新更新