Postman刷新GraphQL Schema失败:空查询致Spring Boot报错
Postman刷新GraphQL Schema触发Spring Boot空查询错误
我在使用Postman配合Spring Boot进行GraphQL请求时,尝试刷新Schema时应用抛出如下错误:
graphql.AssertException: query can't be null at graphql.Assert.assertNotNull(Assert.java:17) at graphql.ExecutionInput$Builder.query(ExecutionInput.java:204) at graphql.kickstart.execution.input.GraphQLSingleInvocationInput.createExecutionInput(GraphQLSingleInvocationInput.java:47)
经排查,问题根源是Postman发送的刷新查询为空,@Postman团队请修复此问题。
正确的自省查询应为:
query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } } }
(注:原示例查询未闭合,已补充完整语法)
内容的提问来源于stack exchange,提问作者Fatih AKSOY
相关产品推荐
相关产品推荐

