Skip to content

Commit

Permalink
Use indexer API via API Gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
banool committed Mar 14, 2024
1 parent 5d80f34 commit 1a336ec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/types/codegen.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/utils/apiEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0

export const NetworkToIndexerAPI: Record<string, string> = {
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",
};
Expand Down
2 changes: 1 addition & 1 deletion src/utils/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1a336ec

Please sign in to comment.