Skip to content

subgraphEndpoints

A constant object that provides a mapping of network names to their corresponding Graph Protocol endpoint URLs.

Usage

import subgraphEndpoints from '@ethereum-tag-service/subgraph-endpoints'
 
const endpoint = subgraphEndpoints.baseSepolia
// @log: Output: "https://api.studio.thegraph.com/query/87165/ets-base-sepolia/version/latest"
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2307. Expected: // @errors: 2307 Compiler Errors: index.ts [2307] 30 - Cannot find module '@ethereum-tag-service/subgraph-endpoints' or its corresponding type declarations.

Returns

Record<string, string>

An object containing network names mapped to their endpoint URLs.

Properties

Network Keys

  • Type: string
  • Description: Network identifier keys

Examples

import subgraphEndpoints from '@ethereum-tag-service/subgraph-endpoints'
 
// Access localhost endpoint
const localEndpoint = subgraphEndpoints.localhost 
// @log: Output: "http://localhost:8000/subgraphs/name/ets-local"
 
// Access Base Sepolia endpoint
const baseEndpoint = subgraphEndpoints.baseSepolia 
// @log: Output: "https://api.studio.thegraph.com/query/87165/ets-base-sepolia/version/latest"
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2307. Expected: // @errors: 2307 Compiler Errors: index.ts [2307] 30 - Cannot find module '@ethereum-tag-service/subgraph-endpoints' or its corresponding type declarations.