Skip to content

Commit 130c551

Browse files
authored
Updating from "Intro" to "How-to" (#956)
* Updating * build * fix
1 parent cd9ae21 commit 130c551

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

website/src/pages/en/subgraphs/querying/introduction.mdx

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,43 @@
11
---
2-
title: Querying The Graph
3-
sidebarTitle: Introduction
2+
title: How to Query a Subgraph Using The Graph
3+
sidebarTitle: How to Query
44
---
55

6-
To start querying right away, visit [The Graph Explorer](https://thegraph.com/explorer).
6+
To start querying right away, visit [Graph Explorer](https://thegraph.com/explorer). This guide shows you how to find a [Subgraph](/subgraphs/developing/subgraphs/), generate a unique URL, and run queries.
77

88
## Overview
99

10-
When a Subgraph is published to The Graph Network, you can visit its Subgraph details page on Graph Explorer and use the "Query" tab to explore the deployed GraphQL API for each Subgraph.
10+
Querying a Subgraph with The Graph lets you access onchain data in a fast, reliable, and structured way, without running your own indexing infrastructure. This guide shows you how to get started so you can power your dapp or analysis with blockchain data.
1111

12-
## Specifics
12+
## Steps
1313

14-
Each Subgraph published to The Graph Network has a unique query URL in Graph Explorer to make direct queries. You can find it by navigating to the Subgraph details page and clicking on the "Query" button in the top right corner.
14+
### Step 1: Locate Your Subgraph
15+
16+
After a Subgraph is published to The Graph Network, you can visit its Subgraph details page on Graph Explorer.
17+
18+
### Step 2: Retrieve the Query URL
19+
20+
On the Subgraph details page, click Query (top right) or scroll down. Each Subgraph published to The Graph Network has a unique query URL in Graph Explorer to make direct queries.
1521

1622
![Query Subgraph Button](/img/query-button-screenshot.png)
1723

1824
![Query Subgraph URL](/img/query-url-screenshot.png)
1925

20-
You will notice that this query URL must use a unique API key. You can create and manage your API keys in [Subgraph Studio](https://thegraph.com/studio), under the "API Keys" section. Learn more about how to use Subgraph Studio [here](/deploying/subgraph-studio/).
26+
> Please see the [Query API](/subgraphs/querying/graphql-api/) for a complete reference on how to query the Subgraph's entities.
27+
28+
### Step 3: Manage Your API Key
29+
30+
Each query URL requires a valid API key. In [Subgraph Studio](https://thegraph.com/studio), locate the **API Keys** section to create or manage your keys. Learn more about how to use Subgraph Studio [here](/subgraphs/developing/deploying/using-subgraph-studio/).
31+
32+
### Step 4: Check Your Usage Plan
2133

2234
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](/subgraphs/billing/).
2335

24-
> Please see the [Query API](/subgraphs/querying/graphql-api/) for a complete reference on how to query the Subgraph's entities.
36+
## Handling Errors
2537

26-
> Note: If you encounter 405 errors with a GET request to the Graph Explorer URL, please switch to a POST request instead.
38+
If you encounter 405 errors with a GET request to the Graph Explorer URL, please switch to a POST request instead.
2739

28-
### Additional Resources
40+
## Additional Resources
2941

3042
- Use [GraphQL querying best practices](/subgraphs/querying/best-practices/).
3143
- To query from an application, click [here](/subgraphs/querying/from-an-application/).

0 commit comments

Comments
 (0)