Skip to content

Commit a31852c

Browse files
committed
Updating
1 parent 82b8130 commit a31852c

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

website/src/pages/en/subgraphs/querying/_meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import titles from './_meta-titles.json'
22

33
export default {
4-
introduction: '',
4+
introduction: 'How to Query',
55
'managing-api-keys': '',
66
'best-practices': '',
77
'from-an-application': '',

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

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
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 [The 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+
Click the “Query” tab to explore the deployed GraphQL API for each Subgraph.
19+
20+
### Step 2: Retrieve the Query URL
21+
22+
On the Subgraph details page, select **Query** in the top right corner. Each Subgraph published to The Graph Network has a unique query URL in Graph Explorer to make direct queries.
1523

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

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

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/).
28+
> Please see the [Query API](/subgraphs/querying/graphql-api/) for a complete reference on how to query the Subgraph's entities.
29+
30+
### Step 3: Manage Your API Key
31+
32+
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/).
33+
34+
### Step 4: Check Your Usage Plan
2135

2236
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/).
2337

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

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

28-
### Additional Resources
42+
## Additional Resources
2943

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

0 commit comments

Comments
 (0)