Skip to content

Commit 0a5a248

Browse files
idalithbsaihajbenface
authored
Rearranging & adding flags (#735)
* Update website/pages/en/publishing/publishing-a-subgraph.mdx Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com> * Update website/pages/en/publishing/publishing-a-subgraph.mdx Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com> * Update website/pages/en/publishing/publishing-a-subgraph.mdx Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com> * Update website/pages/en/publishing/publishing-a-subgraph.mdx Co-authored-by: Benoît Rouleau <benoit.rouleau@icloud.com> --------- Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com> Co-authored-by: Benoît Rouleau <benoit.rouleau@icloud.com>
1 parent 5634476 commit 0a5a248

File tree

1 file changed

+58
-36
lines changed

1 file changed

+58
-36
lines changed

website/pages/en/publishing/publishing-a-subgraph.mdx

Lines changed: 58 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,83 @@
22
title: Publishing a Subgraph to the Decentralized Network
33
---
44

5-
Once your subgraph has been [deployed to Subgraph Studio](/deploying/deploying-a-subgraph-to-studio), you have tested it out, and you are ready to put it into production, you can then publish it to the decentralized network.
5+
Once you have [deployed your subgraph to Subgraph Studio](/deploying/deploying-a-subgraph-to-studio) and it's ready to go into production, you can publish it to the decentralized network.
66

7-
Publishing a Subgraph to the decentralized network makes it available for [Curators](/network/curating) to begin curating on it, and [Indexers](/network/indexing) to begin indexing it.
7+
When you publish a subgraph to the decentralized network, you make it available for:
8+
9+
- [Curators](/network/curating) to begin curating it.
10+
- [Indexers](/network/indexing) to begin indexing it.
811

912
<VideoEmbed youtube="satdwdbvzAQ" />
1013

11-
You can find the list of the supported networks [Here](/developing/supported-networks).
14+
Check out the list of [supported networks](/developing/supported-networks).
15+
16+
## Publishing from Subgraph Studio
17+
18+
1. Go to the [Subgraph Studio](https://thegraph.com/studio/) dashboard
19+
2. Click on the **Publish** button
20+
3. Your subgraph will now be visible in [Graph Explorer](https://thegraph.com/explorer/).
21+
22+
All published versions of an existing subgraph can:
23+
24+
- Be published to Arbitrum One. [Learn more about The Graph Network on Arbitrum](/arbitrum/arbitrum-faq).
25+
26+
- Index data on any of the [supported networks](/developing/supported-networks), regardless of the network on which the subgraph was published.
27+
28+
### Updating metadata for a published subgraph
29+
30+
- After publishing your subgraph to the decentralized network, you can update the metadata anytime in Subgraph Studio.
31+
- Once you’ve saved your changes and published the updates, they will appear in Graph Explorer.
32+
- It's important to note that this process will not create a new version since your deployment has not changed.
33+
34+
## Publishing from the CLI
35+
36+
As of version 0.73.0, you can also publish your subgraph with the [`graph-cli`](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli).
1237

13-
## Publishing a subgraph
38+
1. Open the `graph-cli`.
39+
2. Use the following commands: `graph codegen && graph build` then `graph publish`.
40+
3. A window will open, allowing you to connect your wallet, add metadata, and deploy your finalized subgraph to a network of your choice.
1441

15-
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](https://thegraph.com/explorer/).
42+
![cli-ui](/img/cli-ui.png)
1643

17-
- Subgraphs can be published to Arbitrum One. [Learn more about The Graph Network on Arbitrum](/arbitrum/arbitrum-faq).
44+
### Customizing your deployment
1845

19-
- Regardless of the network the subgraph was published on, it can index data on any of the [supported networks](/developing/supported-networks).
46+
You can upload your subgraph build to a specific IPFS node and further customize your deployment with the following flags:
2047

21-
- When publishing a new version for an existing subgraph the same rules apply as above.
48+
```
49+
USAGE
50+
$ graph publish [SUBGRAPH-MANIFEST] [-h] [--protocol-network arbitrum-one|arbitrum-sepolia --subgraph-id <value>] [-i <value>] [--ipfs-hash <value>] [--webapp-url
51+
<value>]
52+
53+
FLAGS
54+
-h, --help Show CLI help.
55+
-i, --ipfs=<value> [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node.
56+
--ipfs-hash=<value> IPFS hash of the subgraph manifest to deploy.
57+
--protocol-network=<option> [default: arbitrum-one] The network to use for the subgraph deployment.
58+
<options: arbitrum-one|arbitrum-sepolia>
59+
--subgraph-id=<value> Subgraph ID to publish to.
60+
--webapp-url=<value> [default: https://cli.thegraph.com/publish] URL of the web UI you want to use to deploy.
61+
62+
```
2263

2364
## Adding signal to your subgraph
2465

25-
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](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md). Specifically supported networks can be checked [here](/developing/supported-networks).
66+
Developers can add GRT signal to their subgraphs to incentivize Indexers to query the subgraph.
67+
68+
- 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.
69+
70+
- You can check indexing reward eligibility based on subgraph feature usage [here](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md).
71+
72+
- Specific supported networks can be checked [here](/developing/supported-networks).
2673

2774
> Adding signal to a subgraph which is not eligible for rewards will not attract additional Indexers.
2875
29-
> 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
76+
> If your subgraph is eligible for rewards, it is recommended that you curate your own subgraph with at least 3,000 GRT in order to attract additional indexers to index your subgraph.
3077
3178
The [Sunrise Upgrade Indexer](/sunrise/#what-is-the-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.
3279

3380
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.
3481

35-
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 support@thegraph.zendesk.com and specify the subgraphs you need assistance with.
36-
3782
Indexers can find subgraphs to index based on curation signals they see in Graph Explorer.
3883

3984
![Explorer subgraphs](/img/explorer-subgraphs.png)
@@ -46,27 +91,4 @@ Alternatively, you can add GRT signal to a published subgraph from Graph Explore
4691

4792
![Signal from Explorer](/img/signal-from-explorer.png)
4893

49-
## Updating metadata for a published subgraph
50-
51-
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.
52-
53-
## Publishing from the CLI
54-
55-
As of version 0.73.0, you can also publish your subgraph with the `graph-cli`.
56-
57-
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.
58-
59-
![cli-ui](/img/cli-ui.png)
60-
61-
You can also upload your build to a specific IPFS node and futher customize your deployment with the following flags:
62-
63-
```
64-
USAGE
65-
$ graph publish [SUBGRAPH-MANIFEST] [-h] [-i <value>] [--ipfs-hash <value>] [--webapp-url <value>]
66-
67-
FLAGS
68-
-h, --help Show CLI help.
69-
-i, --ipfs=<value> [default: https://api.thegraph.com/ipfs/api/v0] Upload build results to an IPFS node.
70-
--ipfs-hash=<value> IPFS hash of the subgraph manifest to deploy.
71-
--webapp-url=<value> [default: https://cli.thegraph.com/publish] URL of the web UI you want to use to deploy.
72-
```
94+
Learn more about [Curating](/network/curating/) on The Graph Network.

0 commit comments

Comments
 (0)