[英]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.