Documentation ¶
Index ¶
Constants ¶
View Source
const ( // GraphUrlMainnet GraphUrlTestnet According to the https://aptos.dev/guides/indexing/#rate-limits. Both APIs are limited to 300 requests per IP per hour GraphUrlMainnet = "https://indexer.mainnet.aptoslabs.com/v1/graphql" GraphUrlTestnet = "https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql" )
Variables ¶
This section is empty.
Functions ¶
func FetchGraphQL ¶
func FetchGraphQL(operationsDoc, operationName string, variables map[string]interface{}, graphUrl string, out interface{}) error
FetchGraphQL [GraphQL](https://cloud.hasura.io/public/graphiql?endpoint=https://indexer.mainnet.aptoslabs.com/v1/graphql) @param grahpUrl Default mainnet url `https://indexer.mainnet.aptoslabs.com/v1/graphql` if unspecified.
func FetchGraphQLSample ¶
If query has only one statement, `operationName` can be left unspecified
Types ¶
type GraphQLError ¶
type GraphQLError struct { Extensions struct { Code string `json:"code"` Path string `json:"path"` } `json:"extensions"` Message string `json:"message"` }
func (GraphQLError) Error ¶
func (e GraphQLError) Error() string
type GraphQLResponse ¶
type GraphQLResponse struct { Errors []GraphQLError `json:"errors,omitempty"` Data json.RawMessage `json:"data,omitempty"` }
Click to show internal directories.
Click to hide internal directories.