From 419351ded327fc928bef955c477e4faac156a9a4 Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Fri, 3 May 2024 11:52:40 +0200 Subject: [PATCH] Add subgraph deployment and publication instructions --- subgraph/README.md | 60 ++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/subgraph/README.md b/subgraph/README.md index 4255558f5..17ad2b5fe 100644 --- a/subgraph/README.md +++ b/subgraph/README.md @@ -78,39 +78,59 @@ Note: use it only if your subgraph is not created in the local Graph node. ### Deploy the subgraph to Subgraph Studio -1. You need to connect wallet to use Subgraph Studio [Metamask, WalletConnect, Coinbase Wallet or Safe]. +1. Go to [Subgraph Studio](https://thegraph.com/studio/). Connect wallet to use + the Subgraph Studio using Metamask, WalletConnect, Coinbase Wallet or Safe. + Use a dedicated account for the Acre team. + +2. Once the account is connected, all subgraphs are available in the [My + Dashboard](https://thegraph.com/studio/) tab. Select the correct subgraph. + +3. Before being able to deploy subgraph to the Subgraph Studio, you need to + login into your account within the CLI. ``` - https://thegraph.com/studio/ + graph auth --studio ``` -2. We're going to create a Subgraph. To do that you need to click Create a Subgraph button in My Dashboard of Subgraph Studio. - -3. In the next step you'll need to add name of Subgraph and choose indexed blockchain from the list. + The `` can be found on "My Subgraphs" page or subgraph details + page. -4. Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command: +4. Deploying a Subgraph to Subgraph Studio ``` - graph init --studio + graph deploy --studio ``` - The value can be found on your subgraph details page in Subgraph Studio - (https://thegraph.com/docs/en/deploying/deploying-a-subgraph-to-studio/#create-your-subgraph-in-subgraph-studio) + The `` can be found on subgraph details page in the Subgraph + Studio. -5. Before being able to deploy your subgraph to Subgraph Studio, you need to login into your account within the CLI. + After running this command, the CLI will ask for a version label, you can + name it however you want, you can use labels such as 0.1 and 0.2 or use + letters as well such as uniswap-v2-0.1. - ``` - graph auth --studio - ``` +If you have any problems, take a look +[here](https://thegraph.com/docs/en/deploying/deploying-a-subgraph-to-studio/). - The can be found on your "My Subgraphs" page or your subgraph details page. +### Publish the subgraph to the Decentralized Network -6. Deploying a Subgraph to Subgraph Studio +Subgraphs can be published to the decentralized network directly from the +Subgraph Studio dashboard. - ``` - graph deploy --studio - ``` +1. Select the correct subgraph from the Subgraph Studio. + +2. Click the "Publish" button + +3. While you’re going through your publishing flow, you’ll be able to push to + either Arbitrum One or Arbitrum Sepolia. + + - Publishing to Arbitrum Sepolia is free. This will allow you to see how the + subgraph will work in the [Graph Explorer](https://thegraph.com/explorer) + and will allow you to test curation elements. This is recommended for + testing purposes only. - After running this command, the CLI will ask for a version label, you can name it however you want, you can use labels such as 0.1 and 0.2 or use letters as well such as uniswap-v2-0.1. +4. Click the "Publish new Subgraph" button. Once a subgraph is published, it + will be available to view in the [Graph + Explorer](https://thegraph.com/explorer). -7. More information about deploying your subgraph to Subgraph Studio: https://thegraph.com/docs/en/deploying/subgraph-studio/ +If you have any problems, take a look +[here](https://thegraph.com/docs/en/publishing/publishing-a-subgraph/).