diff --git a/website/pages/en/subgraphs/querying/from-an-application.mdx b/website/pages/en/subgraphs/querying/from-an-application.mdx index a9f8162ebcf0..6a3a13b8d141 100644 --- a/website/pages/en/subgraphs/querying/from-an-application.mdx +++ b/website/pages/en/subgraphs/querying/from-an-application.mdx @@ -4,17 +4,17 @@ 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 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 receive two GraphQL API endpoints that look like this: -### Subgraph Studio +### Subgraph Studio Endpoint ``` https://api.studio.thegraph.com/query/// ``` -### Graph Explorer +### Network Endpoint ``` https://gateway.thegraph.com/api//subgraphs/id/ @@ -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 {