Skip to content

Commit 3b3fc9e

Browse files
idalithbbenface
andauthored
Query app update (#853)
* API-Endpoint * adjustment * Update website/pages/en/subgraphs/querying/from-an-application.mdx --------- Co-authored-by: Benoît Rouleau <[email protected]>
1 parent 5f28ecb commit 3b3fc9e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

website/pages/en/subgraphs/querying/from-an-application.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ title: Querying from an Application
44

55
Learn how to query The Graph from your application.
66

7-
## Getting GraphQL Endpoint
7+
## Getting GraphQL Endpoints
88

9-
Once a subgraph is deployed to [Subgraph Studio](https://thegraph.com/studio/) or [Graph Explorer](https://thegraph.com/explorer), you will be given the endpoint for your GraphQL API that should look something like this:
9+
Once a subgraph is deployed to [Subgraph Studio](https://thegraph.com/studio/) or [Graph Explorer](https://thegraph.com/explorer), you will receive two GraphQL API endpoints that look like this:
1010

11-
### Subgraph Studio
11+
### Subgraph Studio Endpoint
1212

1313
```
1414
https://api.studio.thegraph.com/query/<ID>/<SUBGRAPH_NAME>/<VERSION>
1515
```
1616

17-
### Graph Explorer
17+
### Network Endpoint
1818

1919
```
2020
https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>
@@ -88,11 +88,11 @@ sources:
8888
- name: uniswapv2
8989
handler:
9090
graphql:
91-
endpoint: https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2
91+
endpoint: https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>
9292
- name: compoundv2
9393
handler:
9494
graphql:
95-
endpoint: https://api.thegraph.com/subgraphs/name/graphprotocol/compound-v2
95+
endpoint: https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>
9696

9797
documents:
9898
- ./src/example-query.graphql
@@ -179,7 +179,7 @@ Query the API with the following code:
179179
```javascript
180180
import { ApolloClient, InMemoryCache, gql } from '@apollo/client'
181181

182-
const APIURL = 'https://api.studio.thegraph.com/query//<SUBGRAPH_NAME>/'
182+
const APIURL = 'https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>'
183183

184184
const tokensQuery = `
185185
query {
@@ -268,7 +268,7 @@ Query the API with the following code:
268268
```javascript
269269
import { createClient } from 'urql'
270270

271-
const APIURL = 'https://api.thegraph.com/subgraphs/name/username/subgraphname'
271+
const APIURL = 'https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>'
272272

273273
const tokensQuery = `
274274
query {

0 commit comments

Comments
 (0)