Skip to content

Commit 617314c

Browse files
MichaelMacaulayazf20benface
authored
Sunbeam updates (#629)
* Editing * Date placeholders * update cookbooks to use subgraph studio * remove querying-the-hosted-service * simplify placeholder * update upgrading and publishing guides * add note to hosted service deployment page * update querying page * update faq * linting * capital I Co-authored-by: Benoît Rouleau <[email protected]> * Simon's feedback * Update website/pages/en/querying/querying-the-graph.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Update website/pages/en/publishing/publishing-a-subgraph.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Update website/pages/en/publishing/publishing-a-subgraph.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Update website/pages/en/deploying/hosted-service.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Update website/pages/en/cookbook/near.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Update website/pages/en/cookbook/near.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Update website/pages/en/cookbook/near.mdx Co-authored-by: Benoît Rouleau <[email protected]> * Subgraph studio fix * final tweaks * Adding dates * Adding year --------- Co-authored-by: azf20 <[email protected]> Co-authored-by: Adam Fuller <[email protected]> Co-authored-by: Benoît Rouleau <[email protected]>
1 parent 3a18ace commit 617314c

18 files changed

+141
-124
lines changed

website/pages/en/cookbook/arweave.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Building Subgraphs on Arweave
33
---
44

5-
> Arweave support in Graph Node and on the hosted service is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs!
5+
> Arweave support in Graph Node and on the Subgraph Studio is in beta: please reach us on [Discord](https://discord.gg/graphprotocol) with any questions about building Arweave subgraphs!
66
77
In this guide, you will learn how to build and deploy Subgraphs to index the Arweave blockchain.
88

@@ -83,7 +83,7 @@ dataSources:
8383
```
8484
8585
- Arweave subgraphs introduce a new kind of data source (`arweave`)
86-
- The network should correspond to a network on the hosting Graph Node. On the hosted service, Arweave's mainnet is `arweave-mainnet`
86+
- The network should correspond to a network on the hosting Graph Node. in Subgraph Studio, Arweave's mainnet is `arweave-mainnet`
8787
- Arweave data sources introduce an optional source.owner field, which is the public key of an Arweave wallet
8888

8989
Arweave data sources support two types of handlers:
@@ -150,12 +150,12 @@ Block handlers receive a `Block`, while transactions receive a `Transaction`.
150150

151151
Writing the mappings of an Arweave Subgraph is very similar to writing the mappings of an Ethereum Subgraph. For more information, click [here](/developing/creating-a-subgraph/#writing-mappings).
152152

153-
## Deploying an Arweave Subgraph on the hosted service
153+
## Deploying an Arweave Subgraph in Subgraph Studio
154154

155-
Once your subgraph has been created on the hosted service dashboard, you can deploy by using the `graph deploy` CLI command.
155+
Once your subgraph has been created on your Subgraph Studio dashboard, you can deploy by using the `graph deploy` CLI command.
156156

157157
```bash
158-
graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token <your-access-token>
158+
graph deploy --studio --access-token <your-access-token>
159159
```
160160

161161
## Querying an Arweave Subgraph

website/pages/en/cookbook/cosmos.mdx

+5-7
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,14 @@ $ graph build
196196

197197
## Deploying a Cosmos subgraph
198198

199-
Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command after running the `graph create` CLI command:
199+
Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command:
200200

201-
**Hosted Service**
201+
**Subgraph Studio**
202202

203-
```bash
204-
graph create account/subgraph-name --product hosted-service
205-
```
203+
Visit the Subgraph Studio to create a new subgraph.
206204

207205
```bash
208-
graph deploy account/subgraph-name --product hosted-service
206+
graph deploy --studio subgraph-name
209207
```
210208

211209
**Local Graph Node (based on default configuration):**
@@ -236,7 +234,7 @@ Cosmos Hub mainnet is `cosmoshub-4`. Cosmos Hub current testnet is `theta-testne
236234

237235
### Osmosis
238236

239-
> Osmosis support in Graph Node and on the Hosted Service is in beta: please contact the graph team with any questions about building Osmosis subgraphs!
237+
> Osmosis support in Graph Node and on Subgraph Studio is in beta: please contact the graph team with any questions about building Osmosis subgraphs!
240238

241239
#### What is Osmosis?
242240

website/pages/en/cookbook/grafting.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ In this tutorial, we will be covering a basic usecase. We will replace an existi
2626

2727
## Important Note on Grafting When Upgrading to the Network
2828

29-
> **Caution**: if you are upgrading your subgraph from Subgraph Studio or the hosted service to the decentralized network, it is strongly recommended to avoid using grafting during the upgrade process.
29+
> **Caution**: It is recommended to not use grafting for subgraphs published to The Graph Network
3030
3131
### Why Is This Important?
3232

website/pages/en/cookbook/near.mdx

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Building Subgraphs on NEAR
33
---
44

5-
> NEAR support in Graph Node and on the Hosted Service is in beta: please contact [email protected] with any questions about building NEAR subgraphs!
6-
75
This guide is an introduction to building subgraphs indexing smart contracts on the [NEAR blockchain](https://docs.near.org/).
86

97
## What is NEAR?
@@ -73,7 +71,7 @@ dataSources:
7371
```
7472
7573
- NEAR subgraphs introduce a new `kind` of data source (`near`)
76-
- The `network` should correspond to a network on the hosting Graph Node. On the Hosted Service, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet`
74+
- The `network` should correspond to a network on the hosting Graph Node. On Subgraph Studio, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet`
7775
- NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account.
7876
- NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted.
7977

@@ -175,34 +173,35 @@ This includes a new JSON parsing function - logs on NEAR are frequently emitted
175173

176174
Once you have a built subgraph, it is time to deploy it to Graph Node for indexing. NEAR subgraphs can be deployed to any Graph Node `>=v0.26.x` (this version has not yet been tagged & released).
177175

178-
The Graph's Hosted Service currently supports indexing NEAR mainnet and testnet in beta, with the following network names:
176+
Subgraph Studio and the upgrade Indexer on The Graph Network currently supports indexing NEAR mainnet and testnet in beta, with the following network names:
179177

180178
- `near-mainnet`
181179
- `near-testnet`
182180

183-
More information on creating and deploying subgraphs on the Hosted Service can be found [here](/deploying/deploying-a-subgraph-to-hosted).
181+
More information on creating and deploying subgraphs on Subgraph Studio can be found [here](/deploying/deploying-a-subgraph-to-studio).
184182

185-
As a quick primer - the first step is to "create" your subgraph - this only needs to be done once. On the Hosted Service, this can be done from [your Dashboard](https://thegraph.com/hosted-service/dashboard): "Add Subgraph".
183+
As a quick primer - the first step is to "create" your subgraph - this only needs to be done once. On Subgraph Studio, this can be done from [your Dashboard](https://thegraph.com/studio/): "Create a subgraph".
186184

187185
Once your subgraph has been created, you can deploy your subgraph by using the `graph deploy` CLI command:
188186

189187
```sh
190-
$ graph create --node <graph-node-url> subgraph/name # creates a subgraph on a local Graph Node (on the Hosted Service, this is done via the UI)
191-
$ graph deploy --node <graph-node-url> --ipfs https://api.thegraph.com/ipfs/ # uploads the build files to a specified IPFS endpoint, and then deploys the subgraph to a specified Graph Node based on the manifest IPFS hash
188+
$ graph create --node <graph-node-url> <subgraph-name> # creates a subgraph on a local Graph Node (on Subgraph Studio, this is done via the UI)
189+
$ graph deploy --node <graph-node-url> --ipfs https://api.thegraph.com/ipfs/ <subgraph-name> # uploads the build files to a specified IPFS endpoint, and then deploys the subgraph to a specified Graph Node based on the manifest IPFS hash
192190
```
193191

194192
The node configuration will depend on where the subgraph is being deployed.
195193

196-
### Hosted Service
194+
### Subgraph Studio
197195

198196
```sh
199-
graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token <your-access-token>
197+
graph auth --studio
198+
graph deploy --studio <subgraph-name>
200199
```
201200

202201
### Local Graph Node (based on default configuration)
203202

204203
```sh
205-
graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001
204+
graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 <subgraph-name>
206205
```
207206

208207
Once your subgraph has been deployed, it will be indexed by Graph Node. You can check its progress by querying the subgraph itself:

website/pages/en/cookbook/upgrading-a-subgraph.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ More information about the nature of the network and how to handle re-orgs are d
8787

8888
If you would like to update an existing subgraph on the network, you can do this by deploying a new version of your subgraph to Subgraph Studio using the Graph CLI.
8989

90-
1. Make changes to your current subgraph. A good idea is to test small fixes on Subgraph Studio by publishing to Goerli.
90+
1. Make changes to your current subgraph.
9191
2. Deploy the following and specify the new version in the command (eg. v0.0.1, v0.0.2, etc):
9292

9393
```sh
94-
graph deploy --studio <SUBGRAPH_SLUG>
94+
graph deploy --studio --version <version> <SUBGRAPH_SLUG>
9595
```
9696

9797
3. Test the new version in Subgraph Studio by querying in the playground

website/pages/en/deploying/deploying-a-subgraph-to-hosted.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deploying a Subgraph to the Hosted Service
33
---
44

5-
> If a network is not supported on the hosted service, you can run your own [graph-node](https://github.com/graphprotocol/graph-node) to index it.
5+
> Hosted service endpoints will be deprecated on June 12th 2024. [Learn more](/sunrise).
66
77
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).
88

website/pages/en/deploying/deploying-a-subgraph-to-studio.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ These are the steps to deploy your subgraph to the Subgraph Studio:
1313

1414
## Installing Graph CLI
1515

16-
We are using the same CLI to deploy subgraphs to our [hosted service](https://thegraph.com/hosted-service/) and to the [Subgraph Studio](https://thegraph.com/studio/). Here are the commands to install graph-cli. This can be done using npm or yarn.
16+
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.
1717

1818
**Install with yarn:**
1919

website/pages/en/deploying/hosted-service.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: What is the Hosted Service?
33
---
44

5-
> Please note, the hosted service will begin sunsetting in 2023, but it will remain available to networks that are not supported on the decentralized network. Developers are encouraged to [upgrade their subgraphs to The Graph Network](/cookbook/upgrading-a-subgraph) as more networks are supported. Each network will have their hosted service equivalents gradually sunset to ensure developers have enough time to upgrade subgraphs to the decentralized network. Read more about the sunsetting of the hosted service [here](https://thegraph.com/blog/sunsetting-hosted-service).
5+
> Please note, hosted service endpoints will be deprecated on June 12th 2024 as all subgraphs will need to upgrade to The Graph Network. Please read more in the [Sunrise FAQ](/sunrise)
66
77
This section will walk you through deploying a subgraph to the [hosted service](https://thegraph.com/hosted-service/).
88

@@ -59,4 +59,4 @@ graph init \
5959

6060
## Supported Networks on the hosted service
6161

62-
You can find the list of the supported networks [Here](/developing/supported-networks).
62+
You can find the list of the supported networks [here](/developing/supported-networks).

website/pages/en/deploying/subgraph-studio.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Querying subgraphs generates query fees, used to reward [Indexers](/network/inde
3636

3737
## Subgraph Compatibility with The Graph Network
3838

39-
The Graph Network is not yet able to support all of the data-sources & features available on the hosted service. In order to be supported by Indexers on the network, subgraphs must:
39+
In order to be supported by Indexers on The Graph Network, subgraphs must:
4040

4141
- Index a [supported network](/developing/supported-networks)
4242
- Must not use any of the following features:

website/pages/en/glossary.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ title: Glossary
2424

2525
- **Indexer's Self Stake**: The amount of GRT that Indexers stake to participate in the decentralized network. The minimum is 100,000 GRT, and there is no upper limit.
2626

27-
- **Upgrade Indexer**: A temporary Indexer designed to act as a fallback for subgraph queries not serviced by other Indexers on the network. It ensures a seamless transition for subgraphs upgrading from the hosted service by readily serving their queries upon being published. The upgrade Indexer is not competitive with other Indexers. It supports numerous blockchains that were previously only available on the hosted service.
27+
- **Upgrade Indexer**: A temporary Indexer designed to act as a fallback for subgraph queries not serviced by other Indexers on the network. It ensures a seamless transition for subgraphs upgrading from the hosted service to The Graph Network. The upgrade Indexer is not competitive with other Indexers. It supports numerous blockchains that were previously only available on the hosted service.
2828

2929
- **Delegators**: Network participants who own GRT and delegate their GRT to Indexers. This allows Indexers to increase their stake in subgraphs on the network. In return, Delegators receive a portion of the Indexing Rewards that Indexers receive for processing subgraphs.
3030

@@ -83,3 +83,5 @@ title: Glossary
8383
- **_Updating_ a subgraph**: The process of releasing a new subgraph version with updates to the subgraph's manifest, schema, or mappings.
8484

8585
- **Migrating**: The process of curation shares moving from an old version of a subgraph to a new version of a subgraph (e.g. when v0.0.1 is updated to v0.0.2).
86+
87+
- **Upgrade Window**: The countdown for hosted service users to upgrade their subgraph(s) to The Graph Network beginning on April 11th, and ending on June 12th 2024.

website/pages/en/publishing/publishing-a-subgraph.mdx

+12-4
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,28 @@ You can find the list of the supported networks [Here](/developing/supported-net
1414

1515
Subgraphs can be published to the decentralized network directly from the Subgraph Studio dashboard by clicking on the **Publish** button. Once a subgraph is published, it will be available to view in the [Graph Explorer](https://thegraph.com/explorer/).
1616

17-
- Subgraphs can be published to Goerli, Arbitrum goerli, Arbitrum One, or Ethereum mainnet.
17+
- Subgraphs can be published to Arbitrum One. [Learn more about The Graph Network on Arbitrum](/arbitrum/arbitrum-faq).
1818

1919
- Regardless of the network the subgraph was published on, it can index data on any of the [supported networks](/developing/supported-networks).
2020

2121
- When publishing a new version for an existing subgraph the same rules apply as above.
2222

23-
## Curating your subgraph
23+
## Adding signal to your subgraph
2424

25-
> It is recommended that you curate your own subgraph with at least 3,000 GRT to ensure that it is indexed and available for querying as soon as possible.
25+
Developers can add GRT signal to their subgraphs. If a subgraph is eligible for indexing rewards, Indexers who provide a "proof of indexing" will receive a GRT reward, based on the amount of GRT signalled. You can check indexing reward eligibility based on subgraph feature usage [here](https://github.com/graphprotocol/indexer/blob/main/docs/feature-support-matrix.md). Specifically supported networks can be checked [here](/developing/supported-networks).
2626

27-
Subgraph Studio enables you to be the first to curate your subgraph by adding GRT to your subgraph's curation pool in the same transaction. When publishing your subgraph, make sure to check the button that says, "Be the first to signal on this subgraph."
27+
> Adding signal to a subgraph which is not eligible for rewards will not attract additional Indexers.
28+
29+
> If your subgraph is eligible for rewards, is recommended that you curate your own subgraph with at least 3,000 GRT (as of April 11th, 2024) in order to attract additional indexers to index your subgraph
30+
31+
Subgraph Studio enables you to to add signal to your subgraph by adding GRT to your subgraph's curation pool in the same transaction it is published.
2832

2933
![Curation Pool](/img/curate-own-subgraph-tx.png)
3034

35+
Alternatively, you can add GRT signal to a published subgraph from Graph Explorer.
36+
37+
![Signal from Explorer](/img/signal-from-explorer.png)
38+
3139
## Updating metadata for a published subgraph
3240

3341
Once your subgraph has been published to the decentralized network, you can modify the metadata at any time by making the update in the Subgraph Studio dashboard of the subgraph. After saving the changes and publishing your updates to the network, they will be reflected in The Graph Explorer. This won’t create a new version, as your deployment hasn’t changed.

website/pages/en/querying/_meta.js

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export default {
55
'querying-from-an-application': '',
66
'distributed-systems': '',
77
'graphql-api': '',
8-
'querying-the-hosted-service': '',
98
'querying-by-subgraph-id-vs-deployment-id': '',
109
'graph-client': 'Graph Client',
1110
'querying-with-no-code': '',

website/pages/en/querying/querying-the-graph.mdx

+6-21
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,16 @@
22
title: Querying The Graph
33
---
44

5-
With the subgraph deployed, visit the [Graph Explorer](https://thegraph.com/explorer) to open up a [GraphiQL](https://github.com/graphql/graphiql) interface where you can explore the deployed GraphQL API for the subgraph by issuing queries and viewing the schema.
5+
When a subgraph is published to The Graph Network, you can visit its subgraph details page on [Graph Explorer](https://thegraph.com/explorer) and use the "Playground" tab to explore the deployed GraphQL API for the subgraph, issuing queries and viewing the schema.
66

7-
An example is provided below, but please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities.
7+
> Please see the [Query API](/querying/graphql-api) for a complete reference on how to query the subgraph's entities. You can learn about GraphQL querying best practices [here](/querying/querying-best-practices)
88
9-
## Example
10-
11-
This query lists all the counters our mapping has created. Since we only create one, the result will only contain our one `default-counter`:
12-
13-
```graphql
14-
{
15-
counters {
16-
id
17-
value
18-
}
19-
}
20-
```
21-
22-
## Using The Graph Explorer
23-
24-
Each subgraph published to the decentralized Graph Explorer has a unique query URL that you can find by navigating to the subgraph details page and clicking on the "Query" button on the top right corner. This will open a side pane that will give you the unique query URL of the subgraph as well as some instructions about how to query it.
9+
Each subgraph published to The Graph Network has a unique query URL in Graph Explorer for making direct queries that you can find by navigating to the subgraph details page and clicking on the "Query" button on the top right corner.
2510

2611
![Query Subgraph Pane](/img/query-subgraph-pane.png)
2712

28-
As you can notice, this query URL must use a unique API key. You can create and manage your API keys in the [Subgraph Studio](https://thegraph.com/studio) in the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio).
13+
Learn more about querying from an application [here](/querying/querying-from-an-application).
2914

30-
Querying subgraphs using your API keys will generate query fees that will be paid in GRT. You can learn more about billing [here](/billing).
15+
As you can notice, this query URL must use a unique API key. You can create and manage your API keys in [Subgraph Studio](https://thegraph.com/studio), in the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio).
3116

32-
You can also use the GraphQL playground in the "Playground" tab to query a subgraph within The Graph Explorer.
17+
Subgraph Studio users start on a Free Plan, which allows them to make 100,000 queries per month. Additional queries are available on the Growth Plan, which offers usage based pricing for additional queries, payable by credit card, or GRT on Arbitrum. You can learn more about billing [here](/billing).

website/pages/en/querying/querying-the-hosted-service.mdx

-28
This file was deleted.

0 commit comments

Comments
 (0)