Why CARDANO GRAPHQL API has been stopped and why it is out of date?

Hello guys. I want to ask if anyone knows why CARDANO GRAPHQL API stops so often (as it currently throws a 404 error) and most of all why it doesn’t return up-to-date information for last block number. The difference between the Graphql result and Cardanoscan.io is about 3 days late.
At the moment Cardano Graphql throws error 404 from the request and I get the last block number with number 14001 as well as a bad request.

Here is my query:

query{
     blocks (limit: 1, order_by: { number: desc_nulls_last }) {
          number
     }
}

That seems to be a 3rd party service. Maybe their node is out of sync or something. Did you try contacting https://dandelion.link

1 Like

Hi, this can be due to an unsynced database off which the graphql is workig on
There mechanics are:

  • cardano node uses a database
  • graphql uses a different database
  • graphql connects to cardano node and reads off it and writes into its own database

A lag can appear if the graphql service has been offline and nereds time to catch up. Or the database that graphql uses has been corrupted and needs to catch up

I tried the query you are after on my graphql (which btw i’ve opened to the public) and it looks ok. I think there also might be something wrong with your query as what works for me has a slightly different syntax

query Query { block(limit: 1, order_by: {block_no: desc}, where: {block_no: {_is_null: false}}) { block_no } }

You can use my graphql api if you want to:

https://dynamicstrategies.io/gqlclient

1 Like

GRAPHQL API is offline again ! This time throw “error 503” but test net works fine. I am writing this in order to inform the CARDANO team about the problem and to ask them to pay attention to it. Within a month, CARDANO stopped for the third time.

You are referring to the 3rd party service hosted at dandelion.link ? Not sure how you can conclude Cardano doesn’t work if a 3rd party service throws a HTTP 503 at you.

@dstratio explained already why it may be failing. Also, they (people behind dandelion.link) might not be actively maintaining this service.

1 Like

The network is always on, the blockchain never sleeps… The problem is with the service that is intermediating between yourself and the blockchain.

The most bulletproof way is to run your own node which ensures that you are always synced to the network and then have a graphql service on top that communicates between you (your javascript or other front end) and the node. This is a a bit of hassle and that;'s why there are 3rd party services that offer that (this is not different to ethereum for example where you can run your own node, or use a 3rd party service such as infura and infura has had episodes where it was down)

I have found personally that the service is prone to a lag around the epoch roll (happened yesterday) or if the node goes down and needs to restart for what ever reason - it can take up to 4 hours for the graphql to be in sync again

1 Like