Primecrypto
Covalent
Published in
2 min readMar 12, 2021

--

Covalent VS the Graph — which is better!?

I am taking part in the Covalent Alchemist program and decided to cover the main differences between Covalent vs The Graph. As far as I see it, the main differences are the following:

  1. Covalent has a straightforward REST API. I change the parameters in my REST call and it provides a different result. I don’t need to do anything fancy to obtain results — they can be obtained in the browser by modifying the REST call URL! Even non-geeks can do this.
  2. The Graph requires you to write a subgraph. If I am a new developer, I would need to learn the API of the subgraph, as well as learn how to interact with the Graph’s Postgres DB. Suppose I created a subgraph. I know need to convince Curators to vote my subgraph in. This is not a trivial task! And only then I can query the indexer nodes and get my data.
  3. The main difference, in my mind, is that Covalent queries the WHOLE CHAIN. Including arbitrary wallets. You cannot do this with the Graph. Therefore Covalent is strictly superior technology! :)

As an example, let us query a random wallet:

https://api.covalenthq.com/v1/1/address/0xfe83552aedabd966b2eba21a9b2cdaadf2dbbb2e/balances_v2/?

And we get the following response:

{
"data":{
"address":"0xfe83552aedabd966b2eba21a9b2cdaadf2dbbb2e",
"updated_at":"2021-03-12T19:25:10.226791644Z",
"next_update_at":"2021-03-12T19:30:10.226792331Z",
"quote_currency":"USD",
"chain_id":1,
"items":[
{
"contract_decimals":18,
"contract_name":"Ether",
"contract_ticker_symbol":"ETH",
"contract_address":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"supports_erc":null,
"logo_url":"https://logos.covalenthq.com/tokens/0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.png",
"type":"cryptocurrency",
"balance":"11703922070187167680",
"quote_rate":1836.419,
"quote":21493.305,
"nft_data":null
},
{
"contract_decimals":8,
"contract_name":"0xBitcoin Token",
"contract_ticker_symbol":"0xBTC",
"contract_address":"0xb6ed7644c69416d67b522e20bc294a9a9b405b31",
"supports_erc":[
"erc20"
],
"logo_url":"https://logos.covalenthq.com/tokens/0xb6ed7644c69416d67b522e20bc294a9a9b405b31.png",
"type":"cryptocurrency",
"balance":"578363571",
"quote_rate":0.32720846,
"quote":1.8924545,
"nft_data":null
}
],
"pagination":null
},
"error":false,
"error_message":null,
"error_code":null
}

All of a sudden, we can see the ether balance as well as the token balances.

I dare you to find an API for The Graph that can do the same thing!

:)

--

--