Developers
EVM Tools
The Graph
1min
the graph is a decentralized protocol for indexing and querying data from blockchains such as ethereum or caduceus it makes it possible to query data that is difficult to query directly projects with complex smart contracts like uniswap https //uniswap org/ and nfts initiatives like bored ape yacht club https //boredapeyachtclub com/ store data on the ethereum blockchain, making it really difficult to read anything other than basic data directly from the blockchain in the case of bored ape yacht club, we can perform basic read operations on the contract https //etherscan io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code like getting the owner of a certain ape, getting the content uri of an ape based on their id, or the total supply, as these read operations are programmed directly into the smart contract, but more advanced real world queries and operations like aggregation, search, relationships, and non trivial filtering are not possible for example, if we wanted to query for apes that are owned by a certain address, and filter by one of its characteristics, we would not be able to get that information by interacting directly with the contract itself to get this data, you would have to process every single transfer https //etherscan io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code#l1746 event ever emitted, read the metadata from ipfs using the token id and ipfs hash, and then aggregate it even for these types of relatively simple questions, it would take hours or even days for a decentralized application (dapp) running in a browser to get an answer you could also build out your own server, process the transactions there, save them to a database, and build an api endpoint on top of it all in order to query the data however, this option is resource intensive, needs maintenance, presents a single point of failure, and breaks important security properties required for decentralization running the graph for caduceus currently the graph does not run caduceus nodes, hence to enable the graph for caduceus you would have to run a graph node to index the caduceus blockchain this is something you can do but it requires considerable technical expertise and infrastructure you can see the graph's supported networks here https //thegraph com/docs/en/deploying/deploying a subgraph to hosted/ eventually caduceus will be supported