Skip to content

Commit 5237c7a

Browse files
authored
Revert "Deploy subgraph (#788)"
This reverts commit 7453307.
1 parent b0bb012 commit 5237c7a

29 files changed

+227
-3337
lines changed

nginx.conf

-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ http {
9292
rewrite ^/docs/([a-zA-Z][a-zA-Z])/developing/assemblyscript-api/$ $scheme://$http_host/docs/$1/developing/graph-ts/api/ permanent;
9393
rewrite ^/docs/en/substreams/(?!index\.).+$ https://substreams.streamingfast.io permanent;
9494
rewrite ^/docs/en/firehose/(?!index\.).+$ https://firehose.streamingfast.io permanent;
95-
rewrite ^/docs/([a-zA-Z][a-zA-Z])/deploying/deploying-a-subgraph-to-studio/$ $scheme://$http_host/docs/$1/deploying/deploy-using-subgraph-studio/ permanent;
96-
9795
# Temporary redirects (302)
9896
rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/querying/graph-client/README/ redirect;
9997
rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/developing/graph-ts/README/ redirect;

website/pages/ar/deploying/deploy-using-subgraph-studio.mdx

-139
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Deploying a Subgraph to Subgraph Studio
3+
---
4+
5+
These are the steps to deploy your subgraph to Subgraph Studio:
6+
7+
- Install The Graph CLI (with either yarn or npm)
8+
- Create your Subgraph in Subgraph Studio
9+
- Authenticate your account from the CLI
10+
- Deploying a Subgraph to Subgraph Studio
11+
12+
## Installing Graph CLI
13+
14+
There is a CLI to deploy subgraphs to [Subgraph Studio](https://thegraph.com/studio/). Here are the commands to install `graph-cli`. This can be done using npm or yarn.
15+
16+
**التثبيت بواسطة yarn:**
17+
18+
```bash
19+
yarn global add @graphprotocol/graph-cli
20+
```
21+
22+
**التثبيت بواسطة npm:**
23+
24+
```bash
25+
npm install -g @graphprotocol/graph-cli
26+
```
27+
28+
## Create your Subgraph in Subgraph Studio
29+
30+
Before deploying your actual subgraph you need to create a subgraph in [Subgraph Studio](https://thegraph.com/studio/). We recommend you read our [Studio documentation](/deploying/subgraph-studio) to learn more about this.
31+
32+
## Initialize your Subgraph
33+
34+
Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command:
35+
36+
```bash
37+
graph init --studio <SUBGRAPH_SLUG>
38+
```
39+
40+
The `<SUBGRAPH_SLUG>` value can be found on your subgraph details page in Subgraph Studio:
41+
42+
![Subgraph Studio - Slug](/img/doc-subgraph-slug.png)
43+
44+
After running `graph init`, you will be asked to input the contract address, network, and ABI that you want to query. Doing 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.
45+
46+
## Graph Auth
47+
48+
Before being able to deploy your subgraph to Subgraph Studio, you need to login into your account within the CLI. To do this, you will need your deploy key that you can find on your "My Subgraphs" page or your subgraph details page.
49+
50+
Here is the command that you need to use to authenticate from the CLI:
51+
52+
```bash
53+
graph auth --studio <DEPLOY KEY>
54+
```
55+
56+
## Deploying a Subgraph to Subgraph Studio
57+
58+
Once you are ready, you can deploy your subgraph to Subgraph Studio. Doing this won't publish your subgraph to the decentralized network, it will only deploy it to your Studio account where you will be able to test it and update the metadata.
59+
60+
Here is the CLI command that you need to use to deploy your subgraph.
61+
62+
```bash
63+
graph deploy --studio <SUBGRAPH_SLUG>
64+
```
65+
66+
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`. Those labels will be visible in Graph Explorer and can be used by curators to decide if they want to signal on this version or not, so choose them wisely.
67+
68+
Once deployed, you can test your subgraph in Subgraph Studio using the playground, deploy another version if needed, update the metadata, and when you are ready, publish your subgraph to Graph Explorer.

website/pages/cs/deploying/deploy-using-subgraph-studio.mdx

-139
This file was deleted.

0 commit comments

Comments
 (0)