Documentation ¶
Overview ¶
Package resolvers provides the GraphQL resolver for the explorer service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { AddressRanking struct { Address func(childComplexity int) int Count func(childComplexity int) int } BridgeTransaction struct { FromInfo func(childComplexity int) int Kappa func(childComplexity int) int Pending func(childComplexity int) int SwapSuccess func(childComplexity int) int ToInfo func(childComplexity int) int } DateResult struct { Date func(childComplexity int) int Total func(childComplexity int) int } HistoricalResult struct { DateResults func(childComplexity int) int Total func(childComplexity int) int Type func(childComplexity int) int } PartialInfo struct { Address func(childComplexity int) int BlockNumber func(childComplexity int) int ChainID func(childComplexity int) int FormattedValue func(childComplexity int) int Time func(childComplexity int) int TokenAddress func(childComplexity int) int TokenSymbol func(childComplexity int) int TxnHash func(childComplexity int) int USDValue func(childComplexity int) int Value func(childComplexity int) int } Query struct { AddressRanking func(childComplexity int, hours *int) int BridgeAmountStatistic func(childComplexity int, typeArg model.StatisticType, duration *model.Duration, chainID *int, address *string, tokenAddress *string) int BridgeTransactions func(childComplexity int, chainID *int, address *string, txnHash *string, kappa *string, includePending bool, page int, tokenAddress *string) int CountByChainID func(childComplexity int, chainID *int, address *string, direction *model.Direction, hours *int) int CountByTokenAddress func(childComplexity int, chainID *int, address *string, direction *model.Direction, hours *int) int HistoricalStatistics func(childComplexity int, chainID *int, typeArg *model.HistoricalResultType, days *int) int LatestBridgeTransactions func(childComplexity int, includePending bool, page int) int } TokenCountResult struct { ChainID func(childComplexity int) int Count func(childComplexity int) int TokenAddress func(childComplexity int) int } TransactionCountResult struct { ChainID func(childComplexity int) int Count func(childComplexity int) int } ValueResult struct { USDValue func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type QueryResolver ¶
type QueryResolver interface { BridgeTransactions(ctx context.Context, chainID *int, address *string, txnHash *string, kappa *string, includePending bool, page int, tokenAddress *string) ([]*model.BridgeTransaction, error) LatestBridgeTransactions(ctx context.Context, includePending bool, page int) ([]*model.BridgeTransaction, error) BridgeAmountStatistic(ctx context.Context, typeArg model.StatisticType, duration *model.Duration, chainID *int, address *string, tokenAddress *string) (*model.ValueResult, error) CountByChainID(ctx context.Context, chainID *int, address *string, direction *model.Direction, hours *int) ([]*model.TransactionCountResult, error) CountByTokenAddress(ctx context.Context, chainID *int, address *string, direction *model.Direction, hours *int) ([]*model.TokenCountResult, error) AddressRanking(ctx context.Context, hours *int) ([]*model.AddressRanking, error) HistoricalStatistics(ctx context.Context, chainID *int, typeArg *model.HistoricalResultType, days *int) (*model.HistoricalResult, error) }
type ResolverRoot ¶
type ResolverRoot interface {
Query() QueryResolver
}
Click to show internal directories.
Click to hide internal directories.