【发布时间】:2021-10-17 07:09:39
【问题描述】:
对于背景,我正在关注这里的教程:https://www.youtube.com/watch?v=HuN94qNwQmM。
由于代码太长,我将其放入 git https://github.com/dikeshkumar135/CommandERGQL
现在,当我向这个机构提出请求时,问题来了
query{
platform{
id,
name,
commands{
howTo
}
}
}
我正在获取平台的数据,其中命令值为 null 并出现以下错误:
{
"message": "There was no argument with the name `platform` found on the field `commands`.",
"locations": [
{
"line": 5,
"column": 5
}
],
"path": [
"platform",
1,
"commands"
],
"extensions": {
"fieldName": "commands",
"argumentName": "platform"
}
如果我删除类型,它工作正常,但如果我添加类型,则会出现获取相关对象的问题。
【问题讨论】: