Skip to content

Commit

Permalink
Revert "Deploy subgraph" (#797)
Browse files Browse the repository at this point in the history
Revert "Deploy subgraph (#788)"

This reverts commit 7453307.
  • Loading branch information
idalithb authored Oct 17, 2024
1 parent b0bb012 commit b22ab57
Show file tree
Hide file tree
Showing 29 changed files with 227 additions and 3,337 deletions.
2 changes: 0 additions & 2 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ http {
rewrite ^/docs/([a-zA-Z][a-zA-Z])/developing/assemblyscript-api/$ $scheme://$http_host/docs/$1/developing/graph-ts/api/ permanent;
rewrite ^/docs/en/substreams/(?!index\.).+$ https://substreams.streamingfast.io permanent;
rewrite ^/docs/en/firehose/(?!index\.).+$ https://firehose.streamingfast.io permanent;
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;

# Temporary redirects (302)
rewrite ^/docs/en/querying/graph-client/$ $scheme://$http_host/docs/en/querying/graph-client/README/ redirect;
rewrite ^/docs/en/developing/graph-ts/$ $scheme://$http_host/docs/en/developing/graph-ts/README/ redirect;
Expand Down
139 changes: 0 additions & 139 deletions website/pages/ar/deploying/deploy-using-subgraph-studio.mdx

This file was deleted.

68 changes: 68 additions & 0 deletions website/pages/ar/deploying/deploying-a-subgraph-to-studio.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Deploying a Subgraph to Subgraph Studio
---

These are the steps to deploy your subgraph to Subgraph Studio:

- Install The Graph CLI (with either yarn or npm)
- Create your Subgraph in Subgraph Studio
- Authenticate your account from the CLI
- Deploying a Subgraph to Subgraph Studio

## Installing Graph CLI

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.

**التثبيت بواسطة yarn:**

```bash
yarn global add @graphprotocol/graph-cli
```

**التثبيت بواسطة npm:**

```bash
npm install -g @graphprotocol/graph-cli
```

## Create your Subgraph in Subgraph Studio

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.

## Initialize your Subgraph

Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command:

```bash
graph init --studio <SUBGRAPH_SLUG>
```

The `<SUBGRAPH_SLUG>` value can be found on your subgraph details page in Subgraph Studio:

![Subgraph Studio - Slug](/img/doc-subgraph-slug.png)

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.

## Graph Auth

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.

Here is the command that you need to use to authenticate from the CLI:

```bash
graph auth --studio <DEPLOY KEY>
```

## Deploying a Subgraph to Subgraph Studio

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.

Here is the CLI command that you need to use to deploy your subgraph.

```bash
graph deploy --studio <SUBGRAPH_SLUG>
```

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.

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.
139 changes: 0 additions & 139 deletions website/pages/cs/deploying/deploy-using-subgraph-studio.mdx

This file was deleted.

Loading

0 comments on commit b22ab57

Please sign in to comment.