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/deploying/deploying-a-subgraph-to-studio.mdx
+23-30Lines changed: 23 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,34 @@
1
1
---
2
-
title: Deploying a Subgraph to Subgraph Studio
2
+
title: Deploy Using Subgraph Studio
3
3
---
4
4
5
-
> Before deploying, you must install The Graph CLI; please review [Creating a Subgraph]()
5
+
Learn how to deploy your subgraph in Subgraph Studio.
6
6
7
-
When you deploy a subgraph, you push it to Subgraph Studio, where you'll be able to stage it. It's important to remember that deploying is not the same as publishing. When you publish a subgraph, you are publishing it on-chain.
7
+
> Note: When you deploy a subgraph, you push it to Subgraph Studio, where you'll be able to stage it. It's important to remember that deploying is not the same as publishing. When you publish a subgraph, you are publishing it on-chain.
8
8
9
-
## What can you do in Subgraph Studio?
9
+
## Subgraph Studio Overview
10
10
11
-
[Subgraph Studio]() allows you to do the following:
11
+
In [Subgraph Studio](https://thegraph.com/studio/), you can do the following:
12
12
13
13
- Create and manage your API keys for specific subgraphs
14
-
- Create your Subgraph in Subgraph Studio
14
+
- Create your subgraph
15
15
- Authenticate your account from the CLI
16
-
- Deploy a Subgraph to Subgraph Studio
17
-
- Stage it in the playground environment
18
-
- Integrate it in staging using the query URL
16
+
- Deploy your subgraph
17
+
- Stage your subgraph in the playground environment
18
+
- Integrate your subgraph in staging using the query URL
19
19
20
-
In Subgraph Studio, you can view the following:
20
+
In [Subgraph Studio](https://thegraph.com/studio/), you can view the following:
21
21
22
22
- Your user account controls
23
23
- A list of subgraphs you've created
24
24
- A section to manage your API keys
25
25
- A section to manage, view details, and visualize the status of a specific subgraph
26
26
- A section to manage your billing
27
27
28
-
Step-by-Step
29
-
30
28
## Install the Graph CLI
31
29
30
+
Before deploying, you must install The Graph CLI.
31
+
32
32
You must have [Node.js](https://nodejs.org/) and a package manager of your choice (`npm`, `yarn` or `pnpm`) installed to use the Graph CLI. Check for the [most recent](https://github.com/graphprotocol/graph-tooling/releases?q=%40graphprotocol%2Fgraph-cli&expanded=true) CLI version.
33
33
34
34
**Install with yarn:**
@@ -43,7 +43,7 @@ yarn global add @graphprotocol/graph-cli
43
43
npm install -g @graphprotocol/graph-cli
44
44
```
45
45
46
-
## Create your Subgraph in Subgraph Studio
46
+
## Create your subgraph
47
47
48
48
### Create an account
49
49
@@ -63,7 +63,7 @@ Before deploying your subgraph you need to create a subgraph in [Subgraph Studio
63
63
64
64
<VideoEmbedyoutube="nGIFuC69bSA" />
65
65
66
-
> For additional written detail, review the [quick-start]()
66
+
> For additional written detail, review the [quick-start](/quick-start/)
67
67
68
68
#### Subgraph Compatibility with The Graph Network
69
69
@@ -75,7 +75,7 @@ In order to be supported by Indexers on The Graph Network, subgraphs must:
75
75
- Non-fatal errors
76
76
- Grafting
77
77
78
-
## Initialize your Subgraph
78
+
## Initialize your subgraph
79
79
80
80
Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command:
81
81
@@ -87,21 +87,19 @@ You can view the `<SUBGRAPH_SLUG>` value on your subgraph details page in Subgra
87
87
88
88

89
89
90
-
After running `graph init`, you will be asked to input the contract address, network, and ABI that you want to query.
91
-
92
-
- This will generate a new folder on your local machine with some basic code to start working on your subgraph. You can then finalize your subgraph to make sure it works as expected.
90
+
After running `graph init`, you will be asked to input the contract address, network, and an ABI that you want to query. This will generate a new folder on your local machine with some basic code to start working on your subgraph. You can then finalize your subgraph to make sure it works as expected.
93
91
94
92
## Graph Auth
95
93
96
-
Before can deploy your subgraph to Subgraph Studio, you must login into your account using the CLI. To do this, you will need your deploy key (you can find it on your "My Subgraphs" page or under your subgraph details page).
94
+
Before can deploy your subgraph to Subgraph Studio, you must login into your account using the CLI. To do this, you will need your deploy key, which you can find on your "My Subgraphs" page or under your subgraph details page.
97
95
98
96
Then, use the following command to authenticate from the CLI:
99
97
100
98
```bash
101
99
graph auth --studio <DEPLOY KEY>
102
100
```
103
101
104
-
## Deploying a Subgraph to Subgraph Studio
102
+
## Deploying a subgraph
105
103
106
104
Once you are ready, you can deploy your subgraph to Subgraph Studio.
107
105
@@ -118,19 +116,14 @@ After running this command, the CLI will ask for a version label.
118
116
- It's strongly recommended to use [semver](https://semver.org/) for versioning like `0.0.1`. That said, you are free to choose any string as version such as:`v1`, `version1`, `asdf`.
119
117
- The labels you create will be visible in Graph Explorer and can be used by curators to decide if they want to signal on a specific version or not, so choose them wisely.
120
118
121
-
## Testing your Subgraph
119
+
## Testing your subgraph
122
120
123
-
After deploying, you can test/stage your subgraph in Subgraph Studio, deploy another version, update the metadata, and publish to Graph Explorer when you are ready.
121
+
After deploying, you can test/stage your subgraph in Subgraph Studio, deploy another version, update the metadata, and publish to [Graph Explorer](https://thegraph.com/explorer) when you are ready.
124
122
125
-
Use Subgraph Studio’s playground to:
123
+
Use Subgraph Studio’s playground to check your subgraph logs and see where a subgraph fails.
126
124
127
-
- Check your subgraph logs
128
-
- The subgraph logs will indicate if and where a subgraph fails.
129
-
130
-
## Publish your Subgraph in Subgraph Studio
125
+
## Publish your subgraph
131
126
132
127
You are now ready to publish your subgraph!
133
128
134
-
In order to publish your subgraph successfully, review [publishing a subgraph] (/publishing/publishing-a-subgraph/).
135
-
136
-
<VideoEmbedyoutube="satdwdbvzAQ" />
129
+
In order to publish your subgraph successfully, review [publishing a subgraph](/publishing/publishing-a-subgraph/).
0 commit comments