Skip to content

Instantly share code, notes, and snippets.

@mshick
Last active November 17, 2021 21:35
Show Gist options
  • Save mshick/619a6cdc88f74245fc7288efdee20235 to your computer and use it in GitHub Desktop.
Save mshick/619a6cdc88f74245fc7288efdee20235 to your computer and use it in GitHub Desktop.
ignoreErrors PR

Working query

{
  getCharacter(id: "1") {
    name
  }
}

Query that should error

{
  getCharacter(id: "69420") {
    name
  }
}
{
"projectId": "4d80dc2e-d1e2-4abc-a23f-1424959e3ada",
"dataKey": "AQIDAHhcZWXOdlBglkxBhI23ElO/clC/kuw5ynjXDSqJgfTz8gH/f38rIHIvt1UNlRTCrFh/AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMpHdH/+95xQuCWyKjAgEQgDvJ3++K9gZnb71vLEceWSX3WfPbcnvLJMa0K6rZaYU6r/MbEorWYeBrMY+IUljvoUceeyb6aLuennxwCw==",
"version": 13,
"created": "2021-11-17T15:52:43.682Z",
"updated": "2021-11-17T21:32:45.743Z",
"defaultLocale": "en-us",
"locales": ["en-us"],
"apiVersion": "2",
"schemaVersion": "3.9.0",
"queries": {
"getCharacter": {
"resolver": {
"service": "rick",
"name": "rest:get",
"path": {
"ops": [{ "path": "id", "mapping": "$args.id" }],
"serialize": { "template": "/character/{id}" }
},
"options": { "ignoreErrors": true }
},
"args": {
"type": "object",
"properties": { "id": { "type": "string" } }
},
"shape": "Character"
}
},
"mutations": {},
"shapes": {
"Character": {
"id": "Character",
"name": "Character",
"title": "Character",
"schema": {
"type": "object",
"properties": { "name": { "type": "string" } }
}
}
},
"workflows": {},
"forms": {},
"services": {
"rick": {
"id": "rick",
"provider": "generic",
"title": "Rick",
"namespace": "Rick",
"serviceType": "rest",
"authenticationType": "none",
"options": { "endpoint": "https://rickandmortyapi.com/api" }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment