Error codes

it's always 200..

If you haven't worked with GraphQL it might be a big surprise to you, that we don't rely on HTTP codes here. We there's no resource found, GraphQL would still return 200.

Here's a sample result of the case when there's no races found:

{
  "data": {
    "getRaceResults": {
      "edges": [],
      "pageInfo": {
        "endCursor": null,
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": null
      }
    }
  }
}

The only other HTTP error you'll is 500 if the request is totally incorrect:

{
  "errors": {
    "detail": "Internal Server Error"
  }
}

Last updated