LogoLogo
Package RegistryThe Graph
  • Introduction
  • Getting Started
  • Tutorials
    • Develop Your First Substreams
      • on EVM
      • on Solana
        • Transactions & Instructions
        • Account Changes
      • on Cosmos
        • Injective
        • MANTRA
      • on Starknet
      • on Stellar
    • Publishing a Substreams Package
  • How-To Guides
    • Developing Substreams
      • on EVM
        • Exploring Ethereum
          • Mapping Blocks
          • Filter Transactions
          • Retrieve Events of a Smart Contract
      • on Solana
        • Explore Solana
          • Filter Instructions
          • Filter Transactions
        • SPL Token Tracker
        • NFT Trades
        • DEX Trades
      • on Cosmos
        • Injective
          • Simple Substreams Example
          • Foundational Modules
          • Dojo DEX USDT Volume Subgraph Example
    • Using a Substreams Sink
      • Substreams:SQL
      • Substreams:Subgraph
        • Triggers
        • Graph Out
      • Substreams:Stream
        • JavaScript
        • Go
      • Substreams:PubSub
      • Community Sinks
        • MongoDB
        • Files
        • Key-Value Store
        • Prometheus
    • EVM Extensions
      • Making eth_calls
    • Getting Started Using Rust and Protobuf
      • Rust
        • Option struct
        • Result struct
      • Protobuf Schemas
    • From Yellowstone to Substreams
  • Reference Material
    • Chains and endpoints
      • Ethereum Data Model
    • Never Miss Data
    • Development Container Reference
    • Substreams CLI
      • Install the CLI
      • Authentication
      • Substreams CLI reference
    • Substreams Components
      • Packages
      • Modules
        • Module types
        • Inputs
        • Output
        • Module handlers
        • Module handler creation
        • Indexes
        • Keys in stores
        • Dynamic data sources
        • Aggregation Windows
        • Parameterized Modules
      • Manifests Reference
    • Substreams Architecture
    • Graph-Node
      • Local Development
      • Publish to The Graph Network
    • Indexer Reference
      • Test Substreams Locally
    • Logging, Debugging & Testing
    • Change log
    • FAQ
  • Decentralized Indexing
    • What is The Graph?
Powered by GitBook
On this page
  • Publish to the Decentralized Network
  • Use the CLI to Publish to the Network

Was this helpful?

Edit on GitHub
  1. Reference Material
  2. Graph-Node

Publish to The Graph Network

PreviousLocal DevelopmentNextIndexer Reference

Last updated 5 months ago

Was this helpful?

Publish to the Decentralized Network

The Graph protocol allows you to publish your subgraph to a decentralized network, where indexers will provide and store the data that you need. This is the final step to bring your subgraph to a production environment.

Before publishing to the decentralized network, make sure you have tested your subgraph locally by completing the tutorial.

Use the CLI to Publish to the Network

Publishing to the decentralized network means interacting with The Graph smart contract in the Arbitrum blockchain, so you will need a wallet some ETH on Arbitrum before being able to publish your subgraph.

The Graph CLI provides the graph publish command, which allows you to easily sign the transaction on the The Graph smart contract by using a in-the-browser wallet (e.g. Metamask).

  1. In the directory of your subgraph project, execute graph publish. The command will build your subgraph and publish it to IPFS, as usual.

  2. Then, you will be asked to open a browser window. Press y to open it.

  3. A new window will be opened with a URL similar to this:

https://cli.thegraph.com/publish?id=<SUBGRAPH_ID>
  1. Complete all the mandatory fields, providing relevant information about your subgraph (name, version...).

  2. In the Publish to field, choose The Graph Network.

  3. Press the Deploy button. The wallet of your browser will ask you to sign the transaction.

After signing the transaction, your subgraph will be deployed to the decentralized network. Now, indexers can start indexing the data that you need and you can start making queries through The Graph gateway!

To find out more information about your deployed subgraph, you can use .

The Graph Explorer
subgraph local development
Ethereum Explorer Project Structure