The Graph Concepts

what data can Subgraphs query:

  • historical events
  • state variable
  • view/pure function

The data update mechanism of Subgraphs:

Event-based updates (eventHandlers)
Block-triggered update (blockHandlers)

GraphQL Basic Concepts

How to access blockchain data using subgraph?

  1. Query directly on the playground.

Image description

  1. Querying through curl.
  1. Querying through typescript.

How to create a subgraph for a contract?