From 17ae2738b908356b9e4272553f73dea1aa53f716 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Wed, 15 Jan 2025 15:38:18 -0800 Subject: [PATCH 1/4] API-Endpoint --- .../subgraphs/querying/from-an-application.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/pages/en/subgraphs/querying/from-an-application.mdx b/website/pages/en/subgraphs/querying/from-an-application.mdx index a9f8162ebcf0..c8d7a2ee9f79 100644 --- a/website/pages/en/subgraphs/querying/from-an-application.mdx +++ b/website/pages/en/subgraphs/querying/from-an-application.mdx @@ -6,18 +6,18 @@ Learn how to query The Graph from your application. ## Getting GraphQL Endpoint -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: +Once a subgraph is deployed to [Subgraph Studio](https://thegraph.com/studio/) or [Graph Explorer](https://thegraph.com/explorer), you will be given two endpoints for your GraphQL API that should look something like this: -### Subgraph Studio +### Network Endpoint ``` -https://api.studio.thegraph.com/query/// +https://gateway.thegraph.com/api//subgraphs/id/ ``` -### Graph Explorer +### Subgraph Studio Endpoint ``` -https://gateway.thegraph.com/api//subgraphs/id/ +https://api.studio.thegraph.com/query/// ``` With your GraphQL endpoint, you can use various GraphQL Client libraries to query the subgraph and populate your app with data indexed by the subgraph. @@ -88,11 +88,11 @@ sources: - name: uniswapv2 handler: graphql: - endpoint: https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2 + endpoint: https://gateway.thegraph.com/api//subgraphs/id/ - name: compoundv2 handler: graphql: - endpoint: https://api.thegraph.com/subgraphs/name/graphprotocol/compound-v2 + endpoint: https://gateway.thegraph.com/api//subgraphs/id/ documents: - ./src/example-query.graphql @@ -179,7 +179,7 @@ Query the API with the following code: ```javascript import { ApolloClient, InMemoryCache, gql } from '@apollo/client' -const APIURL = 'https://api.studio.thegraph.com/query///' +const APIURL = 'https://gateway.thegraph.com/api//subgraphs/id/' const tokensQuery = ` query { @@ -268,7 +268,7 @@ Query the API with the following code: ```javascript import { createClient } from 'urql' -const APIURL = 'https://api.thegraph.com/subgraphs/name/username/subgraphname' +const APIURL = 'https://gateway.thegraph.com/api//subgraphs/id/' const tokensQuery = ` query { From df2aaf27340eb384b762476bbd3118005ad64298 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Wed, 15 Jan 2025 15:43:20 -0800 Subject: [PATCH 2/4] adjustment --- .../en/subgraphs/querying/from-an-application.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/pages/en/subgraphs/querying/from-an-application.mdx b/website/pages/en/subgraphs/querying/from-an-application.mdx index c8d7a2ee9f79..0dd38dfba5c7 100644 --- a/website/pages/en/subgraphs/querying/from-an-application.mdx +++ b/website/pages/en/subgraphs/querying/from-an-application.mdx @@ -6,18 +6,18 @@ Learn how to query The Graph from your application. ## Getting GraphQL Endpoint -Once a subgraph is deployed to [Subgraph Studio](https://thegraph.com/studio/) or [Graph Explorer](https://thegraph.com/explorer), you will be given two endpoints for your GraphQL API that should look something like this: +Once a subgraph is deployed to [Subgraph Studio](https://thegraph.com/studio/) or [Graph Explorer](https://thegraph.com/explorer), you will receive a Network and Subgraph Studio endpoint for your GraphQL API that looks like this: -### Network Endpoint +### Subgraph Studio Endpoint ``` -https://gateway.thegraph.com/api//subgraphs/id/ +https://api.studio.thegraph.com/query/// ``` -### Subgraph Studio Endpoint +### Network Endpoint ``` -https://api.studio.thegraph.com/query/// +https://gateway.thegraph.com/api//subgraphs/id/ ``` With your GraphQL endpoint, you can use various GraphQL Client libraries to query the subgraph and populate your app with data indexed by the subgraph. From c2e2b40258c79f6a7afed50b5f87a30556b1472f Mon Sep 17 00:00:00 2001 From: Idalith <126833353+idalithb@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:27:48 -0800 Subject: [PATCH 3/4] Update website/pages/en/subgraphs/querying/from-an-application.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- website/pages/en/subgraphs/querying/from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/en/subgraphs/querying/from-an-application.mdx b/website/pages/en/subgraphs/querying/from-an-application.mdx index 0dd38dfba5c7..85dcdb0173be 100644 --- a/website/pages/en/subgraphs/querying/from-an-application.mdx +++ b/website/pages/en/subgraphs/querying/from-an-application.mdx @@ -6,7 +6,7 @@ Learn how to query The Graph from your application. ## Getting GraphQL Endpoint -Once a subgraph is deployed to [Subgraph Studio](https://thegraph.com/studio/) or [Graph Explorer](https://thegraph.com/explorer), you will receive a Network and Subgraph Studio endpoint for your GraphQL API that looks like this: +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: ### Subgraph Studio Endpoint From 0979aed523c797211911cf4d0c039a95e15b46b4 Mon Sep 17 00:00:00 2001 From: Idalith <126833353+idalithb@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:27:57 -0800 Subject: [PATCH 4/4] Update website/pages/en/subgraphs/querying/from-an-application.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- website/pages/en/subgraphs/querying/from-an-application.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/en/subgraphs/querying/from-an-application.mdx b/website/pages/en/subgraphs/querying/from-an-application.mdx index 85dcdb0173be..6a3a13b8d141 100644 --- a/website/pages/en/subgraphs/querying/from-an-application.mdx +++ b/website/pages/en/subgraphs/querying/from-an-application.mdx @@ -4,7 +4,7 @@ title: Querying from an Application Learn how to query The Graph from your application. -## Getting GraphQL Endpoint +## Getting GraphQL Endpoints 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: