我已经将 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 中配置超时?
我想将字符串日期(指定了时区)转换为LocalDate。
String format = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
String date = "2019-08-31T17:00:00.000-07:00";
System.out.println("LocalDate: " + LocalDate.parse(date, DateTimeFormatter.ofPattern(format)));
System.out.println("Date: " + new SimpleDateFormat(format).parse(date));
Run Code Online (Sandbox Code Playgroud)
上面代码的输出是
LocalDate: 2019-08-31
Date: Sun Sep 01 05:30:00 IST 2019
Run Code Online (Sandbox Code Playgroud)
我无法获得与SimpleDateFormat相同的结果。我想要LocalDate中的2019-09-01。