Skip to content

Commit

Permalink
[fix] outdated changes (#647)
Browse files Browse the repository at this point in the history
* [fix] outdated changes

* [fix] requested changes

* [fix] remove en path
  • Loading branch information
yash251 authored Apr 24, 2024
1 parent 8b1fa6e commit f14a396
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 57 deletions.
4 changes: 2 additions & 2 deletions website/pages/en/deploying/deploying-a-subgraph-to-hosted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Deploying a Subgraph to the Hosted Service

> Hosted service endpoints will be deprecated on June 12th 2024. [Learn more](/sunrise).
This page explains how to deploy a subgraph to the hosted service. To deploy a subgraph you need to first install the [Graph CLI](https://github.com/graphprotocol/graph-cli). If you have not created a subgraph already, see [creating a subgraph](/developing/creating-a-subgraph).
This page explains how to deploy a subgraph to the hosted service. To deploy a subgraph you need to first install the [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli). If you have not created a subgraph already, see [creating a subgraph](/developing/creating-a-subgraph).

## Create a hosted service account

Expand Down Expand Up @@ -32,7 +32,7 @@ Before deploying the subgraph, you need to create it in The Graph Explorer. Go t

**Hide** - Switching this on hides the subgraph in the Graph Explorer.

After saving the new subgraph, you are shown a screen with help on how to install the Graph CLI, how to generate the scaffolding for a new subgraph, and how to deploy your subgraph. The first two steps were covered in the [Defining a Subgraph section](/developing/defining-a-subgraph).
After saving the new subgraph, you are shown a screen with help on how to install the Graph CLI, how to generate the scaffolding for a new subgraph, and how to deploy your subgraph. The first two steps were covered in the [Creating a Subgraph section](/developing/creating-a-subgraph/).

## Deploy a Subgraph on the hosted service

Expand Down
10 changes: 5 additions & 5 deletions website/pages/en/deploying/deploying-a-subgraph-to-studio.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: Deploying a Subgraph to the Subgraph Studio
title: Deploying a Subgraph to Subgraph Studio
---

> Learn how you can deploy non rate-limited subgraphs to Subgraph Studio [here](https://www.notion.so/edgeandnode/The-Graph-Subgraph-Studio-Non-Rate-Limited-Chain-Integration-889fe061ee6b4423a7f8e2c8070b9294).
These are the steps to deploy your subgraph to the 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 the Subgraph Studio
- Create your Subgraph in Subgraph Studio
- Authenticate your account from the CLI
- Deploying a Subgraph to the Subgraph Studio
- 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.
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.

**Install with yarn:**

Expand Down
6 changes: 3 additions & 3 deletions website/pages/en/deploying/hosted-service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ For a comprehensive list, see [Supported Networks](/developing/supported-network

## Create a Subgraph

First follow the instructions [here](/developing/defining-a-subgraph) to install the Graph CLI. Create a subgraph by passing in `graph init --product hosted-service`
First follow the instructions [here](/developing/creating-a-subgraph/#install-the-graph-cli) to install the Graph CLI. Create a subgraph by passing in `graph init --product hosted-service`

### From an Existing Contract

If you already have a smart contract deployed to your network of choice, bootstrapping a new subgraph from this contract can be a good way to get started on the hosted service.

You can use this command to create a subgraph that indexes all events from an existing contract. This will attempt to fetch the contract ABI from [Etherscan](https://etherscan.io/).
You can use this command to create a subgraph that indexes all events from an existing contract. This will attempt to fetch the contract ABI from the block explorer.

```sh
graph init \
Expand All @@ -27,7 +27,7 @@ graph init \
<GITHUB_USER>/<SUBGRAPH_NAME> [<DIRECTORY>]
```

Additionally, you can use the following optional arguments. If the ABI cannot be fetched from Etherscan, it falls back to requesting a local file path. If any optional arguments are missing from the command, it takes you through an interactive form.
Additionally, you can use the following optional arguments. If the ABI cannot be fetched from the block explorer, it falls back to requesting a local file path. If any optional arguments are missing from the command, it takes you through an interactive form.

```sh
--network <ETHEREUM_NETWORK> \
Expand Down
6 changes: 3 additions & 3 deletions website/pages/en/deploying/subgraph-studio-faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Subgraph Studio FAQs

## 2. How do I create an API Key?

To create an API, navigate to the Subgraph Studio and connect your wallet. You will be able to click the API keys tab at the top. There, you will be able to create an API key.
To create an API, navigate to Subgraph Studio and connect your wallet. You will be able to click the API keys tab at the top. There, you will be able to create an API key.

## 3. Can I create multiple API Keys?

Expand All @@ -20,12 +20,12 @@ After creating an API Key, in the Security section, you can define the domains t

## 5. Can I transfer my subgraph to another owner?

Yes, subgraphs that have been published to Mainnet can be transferred to a new wallet or a Multisig. You can do so by clicking the three dots next to the 'Publish' button on the subgraph's details page and selecting 'Transfer ownership'.
Yes, subgraphs that have been published to Arbitrum One can be transferred to a new wallet or a Multisig. You can do so by clicking the three dots next to the 'Publish' button on the subgraph's details page and selecting 'Transfer ownership'.

Note that you will no longer be able to see or edit the subgraph in Studio once it has been transferred.

## 6. How do I find query URLs for subgraphs if I’m not the developer of the subgraph I want to use?

You can find the query URL of each subgraph in the Subgraph Details section of The Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `<api_key>` placeholder with the API key you wish to leverage in the Subgraph Studio.
You can find the query URL of each subgraph in the Subgraph Details section of The Graph Explorer. When you click on the “Query” button, you will be directed to a pane wherein you can view the query URL of the subgraph you’re interested in. You can then replace the `<api_key>` placeholder with the API key you wish to leverage in Subgraph Studio.

Remember that you can create an API key and query any subgraph published to the network, even if you build a subgraph yourself. These queries via the new API key, are paid queries as any other on the network.
18 changes: 9 additions & 9 deletions website/pages/en/deploying/subgraph-studio.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: How to Use the Subgraph Studio
title: How to Use Subgraph Studio
---

Welcome to your new launchpad 👩🏽‍🚀

The Subgraph Studio is your place to build and create subgraphs, add metadata, and publish them to the new decentralized Explorer (more on that [here](/network/explorer)).
Subgraph Studio is your place to build and create subgraphs, add metadata, and publish them to the new decentralized Explorer (more on that [here](/network/explorer)).

What you can do in the Subgraph Studio:
What you can do in Subgraph Studio:

- Create a subgraph through the Studio UI
- Deploy a subgraph using the CLI
Expand All @@ -15,7 +15,7 @@ What you can do in the Subgraph Studio:
- Integrate it in staging using the query URL
- Create and manage your API keys for specific subgraphs

Here in the Subgraph Studio, you have full control over your subgraphs. Not only can you test your subgraphs before you publish them, but you can also restrict your API keys to specific domains and only allow certain Indexers to query from their API keys.
Here in Subgraph Studio, you have full control over your subgraphs. Not only can you test your subgraphs before you publish them, but you can also restrict your API keys to specific domains and only allow certain Indexers to query from their API keys.

Querying subgraphs generates query fees, used to reward [Indexers](/network/indexing) on the Graph network. If you’re a dapp developer or subgraph developer, the Studio will empower you to build better subgraphs to power your or your community’s queries. The Studio is comprised of 5 main parts:

Expand All @@ -27,7 +27,7 @@ Querying subgraphs generates query fees, used to reward [Indexers](/network/inde

## How to Create Your Account

1. Sign in with your wallet - you can do this via MetaMask or WalletConnect
1. Sign in with your wallet - you can do this via MetaMask, WalletConnect, Coinbase Wallet or Safe.
1. Once you sign in, you will see your unique deploy key on your account home page. This will allow you to either publish your subgraphs or manage your API keys + billing. You will have a unique deploy key that can be re-generated if you think it has been compromised.

## How to Create a Subgraph in Subgraph Studio
Expand All @@ -50,7 +50,7 @@ More features & networks will be added to The Graph Network incrementally.

![Subgraph Lifecycle](/img/subgraph-lifecycle.png)

After you have created your subgraph, you will be able to deploy it using the [CLI](https://github.com/graphprotocol/graph-cli), or command-line interface. Deploying a subgraph with the CLI will push the subgraph to the Studio where you’ll be able to test subgraphs using the playground. This will eventually allow you to publish to the Graph Network. For more information on CLI setup, [check this out](/developing/defining-a-subgraph#install-the-graph-cli) (pst, make sure you have your deploy key on hand). Remember, deploying is **not the same as** publishing. When you deploy a subgraph, you just push it to the Studio where you’re able to test it. Versus, when you publish a subgraph, you are publishing it on-chain.
After you have created your subgraph, you will be able to deploy it using the [CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), or command-line interface. Deploying a subgraph with the CLI will push the subgraph to the Studio where you’ll be able to test subgraphs using the playground. This will eventually allow you to publish to the Graph Network. For more information on CLI setup, [check this out](/developing/defining-a-subgraph#install-the-graph-cli) (psst, make sure you have your deploy key on hand). Remember, deploying is **not the same as** publishing. When you deploy a subgraph, you just push it to the Studio where you’re able to test it. Versus, when you publish a subgraph, you are publishing it on-chain.

## Testing your Subgraph in Subgraph Studio

Expand All @@ -60,13 +60,13 @@ If you’d like to test your subgraph before publishing it to the network, you c

You’ve made it this far - congrats!

In order to publish your subgraph successfully, you’ll need to go through the following steps outlined in this [blog](https://thegraph.com/blog/building-with-subgraph-studio).
In order to publish your subgraph successfully, you’ll need to go through the following steps outlined in this [section](/publishing/publishing-a-subgraph/).

Check out the video overview below as well:

<VideoEmbed youtube="satdwdbvzAQ" />

Remember, while you’re going through your publishing flow, you’ll be able to push to either mainnet or Goerli. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Goerli, which is free to do. This will allow you to see how the subgraph will work in The Graph Explorer and will allow you to test curation elements.
Remember, while you’re going through your publishing flow, you’ll be able to push to either Arbitrum One or Arbitrum Sepolia. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Arbitrum Sepolia, which is free to do. This will allow you to see how the subgraph will work in The Graph Explorer and will allow you to test curation elements.

Indexers need to submit mandatory Proof of Indexing records as of a specific block hash. Because publishing a subgraph is an action taken on-chain, remember that the transaction can take up to a few minutes to go through. Any address you use to publish the contract will be the only one able to publish future versions. Choose wisely!

Expand All @@ -84,6 +84,6 @@ Please note that there are costs associated with publishing a new version of a s

### Automatic Archiving of Subgraph Versions

Whenever you deploy a new subgraph version in the Subgraph Studio, the previous version will be archived. Archived versions won't be indexed/synced and therefore cannot be queried. You can unarchive an archived version of your subgraph in the Studio UI. Please note that previous versions of non-published subgraphs deployed to the Studio will be automatically archived.
Whenever you deploy a new subgraph version in Subgraph Studio, the previous version will be archived. Archived versions won't be indexed/synced and therefore cannot be queried. You can unarchive an archived version of your subgraph in the Studio UI. Please note that previous versions of non-published subgraphs deployed to the Studio will be automatically archived.

![Subgraph Studio - Unarchive](/img/Unarchive.png)
Loading

0 comments on commit f14a396

Please sign in to comment.