From 1a336ec1b8f235874b7244942a197dccf6ed4e2f Mon Sep 17 00:00:00 2001 From: Daniel Porteous Date: Mon, 26 Feb 2024 14:27:37 +0000 Subject: [PATCH] Use indexer API via API Gateway --- src/api/general.ts | 2 +- src/types/codegen.yaml | 2 +- src/utils/apiEndpoints.ts | 6 +++--- src/utils/const.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/general.ts b/src/api/general.ts index 8aa4e03be..7ae447f54 100644 --- a/src/api/general.ts +++ b/src/api/general.ts @@ -159,7 +159,7 @@ export class General { /** * A generic function for retrieving data from Aptos Indexer. * For more detailed queries specification see - * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql} + * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql} * * @param args.query.query A GraphQL query * @param args.query.variables The variables for the query diff --git a/src/types/codegen.yaml b/src/types/codegen.yaml index 3db1dba5f..c6352c16c 100644 --- a/src/types/codegen.yaml +++ b/src/types/codegen.yaml @@ -1,6 +1,6 @@ overwrite: true documents: src/internal/queries/**/*.graphql -schema: https://indexer.mainnet.aptoslabs.com/v1/graphql +schema: https://api.mainnet.aptoslabs.com/v1/graphql generates: src/types/generated/types.ts: plugins: diff --git a/src/utils/apiEndpoints.ts b/src/utils/apiEndpoints.ts index d0677da5c..3f123e7ca 100644 --- a/src/utils/apiEndpoints.ts +++ b/src/utils/apiEndpoints.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 export const NetworkToIndexerAPI: Record = { - mainnet: "https://indexer.mainnet.aptoslabs.com/v1/graphql", - testnet: "https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql", - devnet: "https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql", + mainnet: "https://api.mainnet.aptoslabs.com/v1/graphql", + testnet: "https://api.testnet.aptoslabs.com/v1/graphql", + devnet: "https://api.devnet.aptoslabs.com/v1/graphql", randomnet: "https://indexer-randomnet.hasura.app/v1/graphql", local: "http://127.0.0.1:8090/v1/graphql", }; diff --git a/src/utils/const.ts b/src/utils/const.ts index 256760e05..0fc44b4e7 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -50,7 +50,7 @@ export const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData"; * The list of supported Processor types for our indexer api. * * These can be found from the processor_status table in the indexer database. - * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql} + * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql} */ export enum ProcessorType { ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",