Skip to content

Guide: Index blockchain events with The Graph for dApps #27

Description

@PetarStoev02

Description

Guide showing how to use The Graph protocol to index and query smart contract events — the decentralized alternative to running your own indexer.

Why this matters

The 32-hour course uses The Graph for the NFT marketplace frontend. Every serious dApp needs indexed event data — transaction history, NFT ownership, DeFi positions. Scanning logs directly is slow and expensive. The Graph provides a GraphQL API over indexed events.

Scope

  • What is The Graph and why indexing matters
  • Subgraph definition (schema, mappings, manifest)
  • Deploying a subgraph to The Graph's hosted/decentralized service
  • Querying subgraphs from TypeScript with GraphQL
  • Subgraph Studio vs self-hosted
  • Common subgraph patterns (NFT ownership, DeFi events, token transfers)
  • Alternatives to The Graph (Goldsky, Envio, custom indexers)

w3-kit approach

  • Focus on the TypeScript querying side (most devs consume, not create, subgraphs)
  • GraphQL client setup with type safety
  • Practical: query Uniswap, Aave, or OpenSea subgraphs
  • When to use The Graph vs direct event polling

Acceptance criteria

  • Guide in guides/
  • Subgraph creation walkthrough
  • TypeScript GraphQL querying examples
  • Comparison of indexing solutions
  • .learn.md explaining how The Graph's decentralized indexing works (curators, indexers, delegators)

Activity

  1. transferred this issue fromw3-kit/clion Apr 3, 2026
  2. github-actions commented on Jun 3, 2026

    @github-actions

    This issue has had no activity in 60 days. Flagging stale.
    If it's still relevant, comment or add it to a due-dated milestone within 30 days, otherwise it will be auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions