Publishing > Publishing a Subgraph to the Decentralized Network

Publishing a Subgraph to the Decentralized Network

Reading time: 4 min

Once your subgraph has been deployed to Subgraph Studio, you have tested it out, and you are ready to put it into production, you can then publish it to the decentralized network.

Publishing a Subgraph to the decentralized network makes it available for Curators to begin curating on it, and Indexers to begin indexing it.

You can find the list of the supported networks Here.

Publishing a subgraph

Link to this section

Subgraphs can be published to the decentralized network directly from Subgraph Studio dashboard by clicking on the Publish button. Once a subgraph is published, it will be available to view in Graph Explorer.

  • Subgraphs can be published to Arbitrum One. Learn more about The Graph Network on Arbitrum.

  • Regardless of the network the subgraph was published on, it can index data on any of the supported networks.

  • When publishing a new version for an existing subgraph the same rules apply as above.

Adding signal to your subgraph

Link to this section

Developers can add GRT signal to their subgraphs. If a subgraph is eligible for indexing rewards, Indexers who provide a "proof of indexing" will receive a GRT reward, based on the amount of GRT signalled. You can check indexing reward eligibility based on subgraph feature usage here. Specifically supported networks can be checked here.

Adding signal to a subgraph which is not eligible for rewards will not attract additional Indexers.

If your subgraph is eligible for rewards, is recommended that you curate your own subgraph with at least 3,000 GRT (as of April 11th, 2024) in order to attract additional indexers to index your subgraph

The Sunrise Upgrade Indexer ensures the indexing of all subgraphs. However, signaling GRT on a particular subgraph will draw more indexers to it. This incentivization of additional Indexers through curation aims to enhance the quality of service for queries by reducing latency and enhancing network availability.

When signaling, Curators can decide to signal on a specific version of the subgraph or to signal using auto-migrate. If they signal using auto-migrate, a curator’s shares will always be updated to the latest version published by the developer. If they decide to signal on a specific version instead, shares will always stay on this specific version.

To assist teams that are transitioning subgraphs from the hosted service to The Graph Network, curation support is now available. If you require assistance with curation to enhance the quality of service, please send a request to the Edge & Node team at [email protected] and specify the subgraphs you need assistance with.

Indexers can find subgraphs to index based on curation signals they see in Graph Explorer.

Explorer subgraphs

Subgraph Studio enables you to add signal to your subgraph by adding GRT to your subgraph's curation pool in the same transaction it is published.

Curation Pool

Alternatively, you can add GRT signal to a published subgraph from Graph Explorer.

Signal from Explorer

Updating metadata for a published subgraph

Link to this section

Once your subgraph has been published to the decentralized network, you can modify the metadata at any time by making the update in Subgraph Studio dashboard of the subgraph. After saving the changes and publishing your updates to the network, they will be reflected in Graph Explorer. This won’t create a new version, as your deployment hasn’t changed.

Publishing from the CLI

Link to this section

As of version 0.73.0, you can also publish your subgraph with the graph-cli.

Simply type graph publish after doing graph build && graph codegen and a window will open, allowing you to connect your wallet, add metadata, and deploy your finalized subgraph to a network of your choice.

cli-ui

You can also upload your build to a specific IPFS node and futher customize your deployment with the following flags:

USAGE
$ graph publish [SUBGRAPH-MANIFEST] [-h] [-i <value>] [--ipfs-hash <value>] [--webapp-url <value>]
FLAGS
-h, --help Show CLI help.
-i, --ipfs=<value> [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node.
--ipfs-hash=<value> IPFS hash of the subgraph manifest to deploy.
--webapp-url=<value> [default: https://cli.thegraph.com/publish] URL of the web UI you want to use to deploy.
Edit page

Previous
Deploying a Subgraph to the Hosted Service
Next
Transferring Subgraph Ownership
Edit page