vir*_*hah 4 java spring-boot graphql
我已经将 Spring boot 与 graphQL(版本 11.1.0)一起使用,它工作正常,但当请求执行时间超过 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.
Run Code Online (Sandbox Code Playgroud)
谁能告诉我如何在 graphQL 中配置超时?
可以使用/graphql.servlet.async-timeout中的属性设置超时。application.ymlapplication.properties
请注意,该值以毫秒为单位。如您所见,默认值为 30000 毫秒。
| 归档时间: |
|
| 查看次数: |
3900 次 |
| 最近记录: |