Skip to content

Instantly share code, notes, and snippets.

View whostolebenfrog's full-sized avatar

Ben Griffiths whostolebenfrog

View GitHub Profile
@whostolebenfrog
whostolebenfrog / minimal-error.json
Created October 28, 2019 14:56
The minimal error response for a GraphQL api
{
"errors": [
{
"message": "Authentication failure"
}
]
}
@whostolebenfrog
whostolebenfrog / error-at-path.json
Last active October 28, 2019 16:13
GraphQL error at a path in the request example
{
"errors": [
{
"message": "Not authorized to access this field",
"locations": [ { "line": 3, "column": 10 } ],
"path": [ "User", "secrets" ],
"extensions": {
"code": "UNAUTHORIZED"
}
},
@whostolebenfrog
whostolebenfrog / null-fields-schema.graphql
Last active October 29, 2019 10:57
Nullable fields GraphQL example
type Push {
commits: [Commit]
}
type Commit {
sha: String!
}