0

I'm using GraphQL.Net and getting the following when trying to use the 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
}

It is quite vague as to what the cause of the error is. Is there something wrong with the setup of my queries / types? Or is it in my request? Is it about authentication?

I'm not sure which code to share, so I uploaded my API library at: https://github.com/jonasarcangel/GraphQLIssue

Request payload is as follows (using 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"
}
ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
Jonas Arcangel
  • 2,085
  • 11
  • 55
  • 85

0 Answers0