resolvers

package
v0.0.93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 11 Imported by: 0

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
	}

	DateResultByChain struct {
		Arbitrum  func(childComplexity int) int
		Aurora    func(childComplexity int) int
		Avalanche func(childComplexity int) int
		Boba      func(childComplexity int) int
		Bsc       func(childComplexity int) int
		Canto     func(childComplexity int) int
		Cronos    func(childComplexity int) int
		Date      func(childComplexity int) int
		Dfk       func(childComplexity int) int
		Dogechain func(childComplexity int) int
		Ethereum  func(childComplexity int) int
		Fantom    func(childComplexity int) int
		Harmony   func(childComplexity int) int
		Klaytn    func(childComplexity int) int
		Metis     func(childComplexity int) int
		Moonbeam  func(childComplexity int) int
		Moonriver func(childComplexity int) int
		Optimism  func(childComplexity int) int
		Polygon   func(childComplexity int) int
		Total     func(childComplexity int) int
	}

	HeroType struct {
		HeroID    func(childComplexity int) int
		Recipient func(childComplexity int) int
	}

	HistoricalResult struct {
		DateResults func(childComplexity int) int
		Total       func(childComplexity int) int
		Type        func(childComplexity int) int
	}

	MessageBusTransaction struct {
		FromInfo  func(childComplexity int) int
		MessageID func(childComplexity int) int
		Pending   func(childComplexity int) int
		ToInfo    func(childComplexity int) int
	}

	PartialInfo struct {
		Address            func(childComplexity int) int
		BlockNumber        func(childComplexity int) int
		ChainID            func(childComplexity int) int
		DestinationChainID func(childComplexity int) int
		FormattedTime      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
	}

	PartialMessageBusInfo struct {
		BlockNumber          func(childComplexity int) int
		ChainID              func(childComplexity int) int
		ChainName            func(childComplexity int) int
		ContractAddress      func(childComplexity int) int
		DestinationChainID   func(childComplexity int) int
		DestinationChainName func(childComplexity int) int
		FormattedTime        func(childComplexity int) int
		Message              func(childComplexity int) int
		MessageType          func(childComplexity int) int
		RevertedReason       func(childComplexity int) int
		Time                 func(childComplexity int) int
		TxnHash              func(childComplexity int) int
	}

	PetType struct {
		Name      func(childComplexity int) int
		PetID     func(childComplexity int) int
		Recipient func(childComplexity int) int
	}

	Query struct {
		AddressRanking         func(childComplexity int, hours *int) int
		AmountStatistic        func(childComplexity int, typeArg model.StatisticType, duration *model.Duration, platform *model.Platform, chainID *int, address *string, tokenAddress *string, useCache *bool, useMv *bool) int
		BridgeTransactions     func(childComplexity int, chainIDFrom []*int, chainIDTo []*int, addressFrom *string, addressTo *string, maxAmount *int, minAmount *int, maxAmountUsd *int, minAmountUsd *int, startTime *int, endTime *int, txnHash *string, kappa *string, pending *bool, useMv *bool, page *int, tokenAddressFrom []*string, tokenAddressTo []*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
		DailyStatisticsByChain func(childComplexity int, chainID *int, typeArg *model.DailyStatisticType, platform *model.Platform, duration *model.Duration, useCache *bool, useMv *bool) int
		MessageBusTransactions func(childComplexity int, chainID []*int, contractAddress *string, startTime *int, endTime *int, txnHash *string, messageID *string, pending *bool, reverted *bool, page *int) int
		RankedChainIDsByVolume func(childComplexity int, duration *model.Duration, useCache *bool) int
	}

	TearType struct {
		Amount    func(childComplexity int) int
		Recipient func(childComplexity 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
	}

	UnknownType struct {
		Known func(childComplexity int) int
	}

	ValueResult struct {
		Value func(childComplexity int) int
	}

	VolumeByChainID struct {
		ChainID func(childComplexity int) int
		Total   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, chainIDFrom []*int, chainIDTo []*int, addressFrom *string, addressTo *string, maxAmount *int, minAmount *int, maxAmountUsd *int, minAmountUsd *int, startTime *int, endTime *int, txnHash *string, kappa *string, pending *bool, useMv *bool, page *int, tokenAddressFrom []*string, tokenAddressTo []*string) ([]*model.BridgeTransaction, error)
	MessageBusTransactions(ctx context.Context, chainID []*int, contractAddress *string, startTime *int, endTime *int, txnHash *string, messageID *string, pending *bool, reverted *bool, page *int) ([]*model.MessageBusTransaction, 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)
	AmountStatistic(ctx context.Context, typeArg model.StatisticType, duration *model.Duration, platform *model.Platform, chainID *int, address *string, tokenAddress *string, useCache *bool, useMv *bool) (*model.ValueResult, error)
	DailyStatisticsByChain(ctx context.Context, chainID *int, typeArg *model.DailyStatisticType, platform *model.Platform, duration *model.Duration, useCache *bool, useMv *bool) ([]*model.DateResultByChain, error)
	RankedChainIDsByVolume(ctx context.Context, duration *model.Duration, useCache *bool) ([]*model.VolumeByChainID, error)
}

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL