Haha, yes we are using the GraphQL clients correctly. I use Apollo, but also test with insomnia and Postman. The errors should be returned no matter what client is used.
It is server side responsibility to return errors not clients.
Maybe you will believe me by looking at Github’s GraphQL API…
https://api.github.com/graphql
Use any GraphQL client with your own auth token to send the following mutation:
mutation {
createDiscussion(input: { body: "foobar" }) {
clientMutationId
}
}
And you will get the errors (from the server)
{
"errors": [
{
"path": [
"mutation",
"createDiscussion",
"input",
"repositoryId"
],
"extensions": {
"code": "missingRequiredInputObjectAttribute",
"argumentName": "repositoryId",
"argumentType": "ID!",
"inputObjectType": "CreateDiscussionInput"
},
"locations": [
{
"line": 1,
"column": 36
}
],
"message": "Argument 'repositoryId' on InputObject 'CreateDiscussionInput' is required. Expected type ID!"
},
{
"path": [
"mutation",
"createDiscussion",
"input",
"title"
],
"extensions": {
"code": "missingRequiredInputObjectAttribute",
"argumentName": "title",
"argumentType": "String!",
"inputObjectType": "CreateDiscussionInput"
},
"locations": [
{
"line": 1,
"column": 36
}
],
"message": "Argument 'title' on InputObject 'CreateDiscussionInput' is required. Expected type String!"
},
{
"path": [
"mutation",
"createDiscussion",
"input",
"categoryId"
],
"extensions": {
"code": "missingRequiredInputObjectAttribute",
"argumentName": "categoryId",
"argumentType": "ID!",
"inputObjectType": "CreateDiscussionInput"
},
"locations": [
{
"line": 1,
"column": 36
}
],
"message": "Argument 'categoryId' on InputObject 'CreateDiscussionInput' is required. Expected type ID!"
}
]
}
This thread is becoming laughable. I am starting to really miss Pawan, Chewy, and Michael Compton ![]()
The presence of a bug is as visible as if the sun was shining at night yet here we are still arguing about whether it is really a bug or not. ![]()