Apollo GraphQL废弃警告

问题描述 投票:0回答:1

我收到了很多不适用的警告。我不知道为什么我会收到这样的警告。谁能指导我一下。

我已经用koa node js框架创建了一个apollo graph ql的模板。我计划在我的下一个项目中使用图ql订阅。然而,这些警告或错误让我感到困惑。这是我的git文件 https:/github.comsumitbhavragraphql-koa.git。

{
          "name": "include",
          "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
          "locations": [
            "FIELD",
            "FRAGMENT_SPREAD",
            "INLINE_FRAGMENT"
          ],
          "args": [
            {
              "name": "if",
              "description": "Included when true.",
              "type": {
                "kind": "NON_NULL",
                "name": null,
                "ofType": {
                  "kind": "SCALAR",
                  "name": "Boolean",
                  "ofType": null
                }
              },
              "defaultValue": null
            }
          ]
        },
        {
          "name": "deprecated",
          "description": "Marks an element of a GraphQL schema as no longer supported.",
          "locations": [
            "FIELD_DEFINITION",
            "ENUM_VALUE"
          ],
          "args": [
            {
              "name": "reason",
              "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",
              "type": {
                "kind": "SCALAR",
                "name": "String",
                "ofType": null
              },
              "defaultValue": "\"No longer supported\""
            }
          ]
        }
node.js graphql apollo
1个回答
1
投票

这不是一个废弃警告。那是一个反省结果,其中包括了关于 @deprecated 指令,它可以在你的类型定义中用来标记个别字段或枚举值为废弃的。

© www.soinside.com 2019 - 2024. All rights reserved.