psychonautwiki / bifrost

The PsychonautWiki API.
MIT License
48 stars 10 forks source link

[Query.substances] When no specific query is provided, returns error: Cannot destructure property `type` of 'undefined' or 'null'. #16

Closed dlbnco closed 4 years ago

dlbnco commented 4 years ago

Since a few days ago, Query.substances started to error. If the query or some other parameters are provided, it works just fine.

query {
  substances {
    name
  }
}
{
  "data": {
    "substances": null
  },
  "errors": [
    {
      "locations": [
        {
          "column": 2,
          "line": 1
        }
      ],
      "message": "Cannot destructure property `type` of 'undefined' or 'null'.",
      "path": [
        "substances"
      ]
    }
  ]
}
19h commented 4 years ago

Thanks for the report! Looking into it.

19h commented 4 years ago

Should be fixed.