0

我正在使用GraphQL.Net并在尝试使用 API 时获得以下信息。

{
  "version": {
    "major": 1,
    "minor": 1,
    "build": -1,
    "revision": -1,
    "majorRevision": -1,
    "minorRevision": -1
  },
  "content": {
    "headers": [
      {
        "key": "Content-Type",
        "value": [
          "application\/json; charset=utf-8"
        ]
      }
    ]
  },
  "statusCode": 400,
  "reasonPhrase": "Bad Request",
  "headers": [

  ],
  "requestMessage": {
    "version": {
      "major": 2,
      "minor": 0,
      "build": -1,
      "revision": -1,
      "majorRevision": -1,
      "minorRevision": -1
    },
    "content": null,
    "method": {
      "method": "GET"
    },
    "requestUri": null,
    "headers": [

    ],
    "properties": {

    }
  },
  "isSuccessStatusCode": false
}

关于错误的原因是什么非常模糊。我的查询/类型的设置有问题吗?还是在我的要求中?是关于身份验证吗?

我不确定要分享哪些代码,所以我将我的 API 库上传到:https ://github.com/jonasarcangel/GraphQLIssue

请求载荷如下(使用 Apollo Angular):

{
  "operationName": "configsQuery",
  "variables": {
    "id": "",
    "module": "admin\/configs",
    "name": "canActivate"
  },
  "query": "query configsQuery($id: String, $module: String, $name: String) {\n  configs(id: $id, module: $module, name: $name) {\n    id\n    createdBy\n    createdDate\n    updatedBy\n    updatedDate\n    name\n    module\n    value\n    __typename\n  }\n}\n"
}
4

0 回答 0