The Graph.
Log in

The flow follows these steps:

A dapp adds data to Ethereum through a transaction on a smart contract. The smart contract emits one or more events while processing the transaction. Graph Node continually scans Ethereum for new blocks and the data for your subgraph they may contain. Graph Node finds Ethereum events for your subgraph in these blocks and runs the mapping handlers you provided. The mapping is a WASM module that creates or updates the data entities that Graph Node stores in response to Ethereum events. The dapp queries the Graph Node for data indexed from the blockchain, using the node's GraphQL endpoint. The Graph Node in turn translates the GraphQL queries into queries for its underlying data store in order to fetch this data, making use of the store's indexing capabilities. The dapp displays this data in a rich UI for end-users, which they use to issue new transactions on Ethereum. The cycle repeats.