DEV Community

MY ZT
MY ZT

Posted on

✨The Graph notes

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.

Enter fullscreen mode Exit fullscreen mode
  1. Querying through typescript.

How to create a subgraph for a contract?

Top comments (0)