英文:
Id not properly defined, syntax error GraphQL-Nerdgraph error
问题
The provided code and error message in your query are as follows:
以下是您的查询中提供的代码和错误消息:
Code (代码):
{
  actor {
    account(id: 123) {
      historicalDataExport {
        export {
          account {
            id: 123
          }
        }
      }
      name
    }
  }
}
Error Message (错误消息):
{
  "errors": [
    {
      "locations": [
        {
          "column": 9,
          "line": 5
        }
      ],
      "message": "In argument \"id\": Expected type \"ID!\", found null."
    }
  ]
}
Is there anything specific you would like to know or clarify about this code or error message? (是否有关于这段代码或错误消息的特定问题需要了解或澄清?)
英文:
Trying to execute the below Nerdgraph query, result is showing error. PFB. Need assistance.
{
  actor {
    account(id: 123) {
      historicalDataExport {
        export {
          account {
            id: 123
          }
        }
      }
      name
    }
  }
}
Response:-
{
  "errors": [
    {
      "locations": [
        {
          "column": 9,
          "line": 5
        }
      ],
      "message": "In argument \"id\": Expected type \"ID!\", found null."
    }
  ]
}
答案1
得分: 1
id是一个查询变量 - 不应包含在输出中。
{
  actor {
    account(id: 123) {
      historicalDataExport {
        export {
          account {
            id  << 只有这一行,不要有其他内容
          }
        }
      }
      name
    }
  }
}
英文:
id is a query variable - it shouldn't be included in the output.
{
  actor {
    account(id: 123) {
      historicalDataExport {
        export {
          account {
            id  << by itself, nothing more on this line
          }
        }
      }
      name
    }
  }
}
</details>
				通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。



评论