Apollo iOS 客户端代码生成:“错误:无法查询字段”

dfe*_*ira 5 ios apollo graphql apollo-client

我正在尝试使用可可豆荚按照此步骤生成代码。步骤: 5. 使用appolo-ios-cli generate命令设置并运行代码生成我收到此错误:

 Error: Cannot query field "getAuthServiceHealth" on type "undefined"
 ./../NetworkInterface/GraphQL/QueriesList.graphql:2:2
1 | query Health {
2 |     getAuthServiceHealth{
  |  ^
3 |         status
Run Code Online (Sandbox Code Playgroud)

查询.graphql:

query Health {
    getAuthServiceHealth{
        status
        service
    }
}
Run Code Online (Sandbox Code Playgroud)

架构:

{
  "__schema": {
    "queryType": {
      "name": "Query"
    },
    "mutationType": null,
    "subscriptionType": null,
    "types": [
      {
        "kind": "OBJECT",
        "name": "Query",
        "description": null,
        "fields": [
          {
            "name": "getAuthServiceHealth",
            "description": null,
            "args": [],
            "type": {
              "kind": "NON_NULL",
              "name": null,
              "ofType": {
                "kind": "OBJECT",
                "name": "HealthResponse",
                "ofType": null
              }
            },
            "isDeprecated": false,
            "deprecationReason": null
          },
Run Code Online (Sandbox Code Playgroud)

为什么我会收到此错误?

谢谢

dfe*_*ira 0

已解决:我已经完成了该线程中讨论的内容: https://github.com/apollographql/apollo-ios/issues/2543#issuecomment-1280466644