chaingraph icon indicating copy to clipboard operation
chaingraph copied to clipboard

"database query error" when fetching block height

Open merc1er opened this issue 1 year ago • 0 comments

When fetching the block height with:

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "query GetBlockheight($node: String!) { block(limit: 1, order_by: { height: desc }, where: { accepted_by: { node: { name: { _like: $node } } } }) { height } }", "variables": { "node": "%testnet" }}' \
  https://demo.chaingraph.cash/v1/graphql

the following response is returned:

{
  "errors": [
    {
      "extensions": {
        "code": "unexpected",
        "path": "$"
      },
      "message": "database query error"
    }
  ]
}

Note that the returned status code is 200 "OK". Also note that the same query works with mainnet.

merc1er avatar Aug 13 '24 06:08 merc1er