Parfournir.
Skills/The Graph/The Graph

The Graph

Decentralized indexing protocol — query blockchain data with GraphQL subgraphs. Index events from Ethereum, Solana, and 40+ networks.

Apache-2.0sdk
by @The Graph
Install
npm install @graphprotocol/client-apollo
SKILL.md

Graph Node

![Build Status](https://github.com/graphprotocol/graph-node/actions/workflows/ci.yml?query=branch%3Amaster) ![Docs](docs/) ![Subgraphs](https://thegraph.com/docs/en/subgraphs/quick-start/)

Overview

The Graph is a decentralized protocol that organizes and distributes blockchain data across the leading Web3 networks. A key component of The Graph's tech stack is Graph Node.

Before using graph-node, it is highly recommended that you read the official Graph documentation to understand Subgraphs, which are the central mechanism for extracting and organizing blockchain data.

This guide is for:

  • Subgraph developers who want to run graph-node locally to test their Subgraphs during development
  • Contributors who want to add features or fix bugs to graph-node itself
  • Running graph-node from Docker images

    For subgraph developers, it is highly recommended to use prebuilt Docker
    images to set up a local graph-node environment. Please read these
    instructions
    to learn how to do that.

    Running graph-node from source

    This is usually only needed for developers who want to contribute to graph-node.

    Prerequisites

    To build and run this project, you need to have the following installed on your system:

  • Rust (latest stable): Follow How to install

  • Rust
    . Run rustup install
    stable
    in _this directory_ to make sure all required components are
    installed. The graph-node code assumes that the latest available
    stable compiler is used.
  • PostgreSQL: PostgreSQL Downloads lists

  • downloads for almost all operating systems.
    - For OSX: We highly recommend Postgres.app.
    - For Linux: Use the Postgres version that comes with the distribution.
  • IPFS: Installing IPFS
  • Protobuf Compiler: Installing Protobuf
  • For Ethereum network data, you can either run your own Ethereum node or use an Ethereum node provider of your choice.

    Create a database

    Once Postgres is running, you need to issue the following commands to create a database
    and configure it for use with graph-node.

    The name of the SUPERUSER depends on your installation, but is usually postgres or your username.

    psql -U <SUPERUSER> <<EOF
    create user graph with password '<password>';
    create database "graph-node" with owner=graph template=template0 encoding='UTF8' locale='C';
    create extension pg_trgm;
    create extension btree_gist;
    create extension postgres_fdw;
    grant usage on foreign data wrapper postgres_fdw to graph;
    EOF

    For convenience, set the connection string

    ... [truncated — view full README on GitHub]

    Details

    Categoryblockchain
    Typesdk
    Sourcegithub
    LicenseApache-2.0

    Use this skill

    Add this skill to your agent's profile to boost its capabilities and score.

    Add to My Agent