You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/pages/en/publishing/publishing-a-subgraph.mdx
+58-36Lines changed: 58 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -2,38 +2,83 @@
2
2
title: Publishing a Subgraph to the Decentralized Network
3
3
---
4
4
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.
6
6
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.
8
11
9
12
<VideoEmbedyoutube="satdwdbvzAQ" />
10
13
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).
12
37
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.
14
41
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
+

16
43
17
-
- Subgraphs can be published to Arbitrum One. [Learn more about The Graph Network on Arbitrum](/arbitrum/arbitrum-faq).
44
+
### Customizing your deployment
18
45
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:
20
47
21
-
- When publishing a new version for an existing subgraph the same rules apply as above.
-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
+
```
22
63
23
64
## Adding signal to your subgraph
24
65
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).
26
73
27
74
> Adding signal to a subgraph which is not eligible for rewards will not attract additional Indexers.
28
75
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.
30
77
31
78
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.
32
79
33
80
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.
34
81
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
-
37
82
Indexers can find subgraphs to index based on curation signals they see in Graph Explorer.
@@ -46,27 +91,4 @@ Alternatively, you can add GRT signal to a published subgraph from Graph Explore
46
91
47
92

48
93
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
-

60
-
61
-
You can also upload your build to a specific IPFS node and futher customize your deployment with the following flags:
0 commit comments