简体   繁体   English

GraphQL 的不可为空错误没有提供太多细节,这可能让我进行调查

[英]Non-nullable error with GraphQL doesn't give much detail which might allow me to investigate

I'm getting this error in a node application I'm trying to use:我在尝试使用的节点应用程序中遇到此错误:

{ [GraphQLError: Cannot return null for non-nullable field Issue.id.]
  message: 'Cannot return null for non-nullable field Issue.id.',
  locations: [ { line: 3, column: 9 } ],
  path: [ 'issueList', 0, 'id' ],
  extensions:
   { code: 'INTERNAL_SERVER_ERROR',
     exception: { stacktrace: [Array] } } }

I assume I'm passing a null ID in my query but the field Issue.id expects a value.我假设我在查询中传递了 null ID,但字段Issue.id需要一个值。

Unfortunately there is nothing else in the error so I don't know where to begin looking into it.不幸的是,错误中没有其他内容,所以我不知道从哪里开始调查它。 How do I fix this?我该如何解决?

The problem was that I was pointing to the wrong database.问题是我指向了错误的数据库。 Issue.id did not even exist in the database I pointed to.我指向的数据库中甚至不存在Issue.id

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GraphQL:不可为空的数组/列表 - GraphQL: Non-nullable array/list 对不可为空的流类型细化不起作用 - Flow type refinement to non-nullable doesn't work Flow为什么不理解可为空的属性与不可为空的对象属性兼容? - Why doesn't Flow understand that nullable properties are compatible with non-nullable object properties? GraphQL 查询返回错误“不能为不可为空的字段返回空值” - GraphQL query returns error "Cannot return null for non-nullable field" GraphQL 错误:无法为不可为空的字段 Mutation.deleteComment 返回 null - GraphQL Error: Cannot return null for non-nullable field Mutation.deleteComment 无法为 GraphQL 查询中的不可空字段返回 null - Cannot return null for non-nullable field in a GraphQL query 阿波罗服务器+续集错误不可为空的字段 - apollo server + sequelize error non-nullable field 为什么 graphql 返回“不能返回 null of non-nullable field mutation.createAccnt” - why is graphql returning “cannot return null of non-nullable field mutation.createAccnt” 在 graphql 中更新/编辑用户数据(不能为不可空字段 Mutation.updateUser 返回 null) - Updating/editing user data in graphql(Cannot return null for non-nullable field Mutation.updateUser) graphql 解析器返回 无法从 nodejs 中的异步 function 为非空字段返回 null - graphql resolver return Cannot return null for non-nullable field from asynchronous function in nodejs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM