resolvers

package
v0.0.158 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

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 {
	BlockTime struct {
		BlockNumber func(childComplexity int) int
		ChainID     func(childComplexity int) int
		Timestamp   func(childComplexity int) int
	}

	Log struct {
		BlockHash       func(childComplexity int) int
		BlockNumber     func(childComplexity int) int
		ChainID         func(childComplexity int) int
		ContractAddress func(childComplexity int) int
		Data            func(childComplexity int) int
		Index           func(childComplexity int) int
		JSON            func(childComplexity int) int
		Page            func(childComplexity int) int
		Receipt         func(childComplexity int) int
		Removed         func(childComplexity int) int
		Topics          func(childComplexity int) int
		Transaction     func(childComplexity int) int
		TxHash          func(childComplexity int) int
		TxIndex         func(childComplexity int) int
	}

	Query struct {
		BlockTime                func(childComplexity int, chainID int, blockNumber int) int
		BlockTimeCount           func(childComplexity int, chainID int) int
		FirstStoredBlockNumber   func(childComplexity int, chainID int) int
		LastConfirmedBlockNumber func(childComplexity int, chainID int) int
		LastIndexed              func(childComplexity int, contractAddress string, chainID int) int
		LastStoredBlockNumber    func(childComplexity int, chainID int) int
		LogCount                 func(childComplexity int, contractAddress string, chainID int) int
		Logs                     func(childComplexity int, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, page int) int
		LogsAtHeadRange          func(childComplexity int, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, startBlock int, endBlock int, page int) int
		LogsRange                func(childComplexity int, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, startBlock int, endBlock int, page int) int
		ReceiptCount             func(childComplexity int, chainID int) int
		Receipts                 func(childComplexity int, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, page int) int
		ReceiptsAtHeadRange      func(childComplexity int, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, startBlock int, endBlock int, page int) int
		ReceiptsRange            func(childComplexity int, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, startBlock int, endBlock int, page int) int
		Transactions             func(childComplexity int, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, page int) int
		TransactionsAtHeadRange  func(childComplexity int, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, startBlock int, endBlock int, lastIndexed int, page int) int
		TransactionsRange        func(childComplexity int, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, startBlock int, endBlock int, page int) int
		TxSender                 func(childComplexity int, txHash string, chainID int) int
	}

	Receipt struct {
		BlockNumber       func(childComplexity int) int
		Bloom             func(childComplexity int) int
		ChainID           func(childComplexity int) int
		ContractAddress   func(childComplexity int) int
		CumulativeGasUsed func(childComplexity int) int
		GasUsed           func(childComplexity int) int
		JSON              func(childComplexity int) int
		Logs              func(childComplexity int) int
		Page              func(childComplexity int) int
		PostState         func(childComplexity int) int
		Status            func(childComplexity int) int
		Transaction       func(childComplexity int) int
		TransactionIndex  func(childComplexity int) int
		TxHash            func(childComplexity int) int
		Type              func(childComplexity int) int
	}

	Transaction struct {
		ChainID   func(childComplexity int) int
		Data      func(childComplexity int) int
		Gas       func(childComplexity int) int
		GasFeeCap func(childComplexity int) int
		GasPrice  func(childComplexity int) int
		GasTipCap func(childComplexity int) int
		JSON      func(childComplexity int) int
		Logs      func(childComplexity int) int
		Nonce     func(childComplexity int) int
		Page      func(childComplexity int) int
		Protected func(childComplexity int) int
		Receipt   func(childComplexity int) int
		Sender    func(childComplexity int) int
		Timestamp func(childComplexity int) int
		To        func(childComplexity int) int
		TxHash    func(childComplexity int) int
		Type      func(childComplexity int) int
		Value     func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type LogResolver

type LogResolver interface {
	Transaction(ctx context.Context, obj *model.Log) (*model.Transaction, error)
	Receipt(ctx context.Context, obj *model.Log) (*model.Receipt, error)
	JSON(ctx context.Context, obj *model.Log) (types.JSON, error)
}

type QueryResolver

type QueryResolver interface {
	Logs(ctx context.Context, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, page int) ([]*model.Log, error)
	LogsRange(ctx context.Context, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Log, error)
	Receipts(ctx context.Context, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, page int) ([]*model.Receipt, error)
	ReceiptsRange(ctx context.Context, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Receipt, error)
	Transactions(ctx context.Context, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, page int) ([]*model.Transaction, error)
	TransactionsRange(ctx context.Context, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Transaction, error)
	BlockTime(ctx context.Context, chainID int, blockNumber int) (*int, error)
	LastStoredBlockNumber(ctx context.Context, chainID int) (*int, error)
	FirstStoredBlockNumber(ctx context.Context, chainID int) (*int, error)
	LastConfirmedBlockNumber(ctx context.Context, chainID int) (*int, error)
	TxSender(ctx context.Context, txHash string, chainID int) (*string, error)
	LastIndexed(ctx context.Context, contractAddress string, chainID int) (*int, error)
	LogCount(ctx context.Context, contractAddress string, chainID int) (*int, error)
	ReceiptCount(ctx context.Context, chainID int) (*int, error)
	BlockTimeCount(ctx context.Context, chainID int) (*int, error)
	LogsAtHeadRange(ctx context.Context, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Log, error)
	ReceiptsAtHeadRange(ctx context.Context, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Receipt, error)
	TransactionsAtHeadRange(ctx context.Context, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, startBlock int, endBlock int, lastIndexed int, page int) ([]*model.Transaction, error)
}

type ReceiptResolver

type ReceiptResolver interface {
	Logs(ctx context.Context, obj *model.Receipt) ([]*model.Log, error)
	Transaction(ctx context.Context, obj *model.Receipt) (*model.Transaction, error)
	JSON(ctx context.Context, obj *model.Receipt) (types.JSON, error)
}

type ResolverRoot

type ResolverRoot interface {
	Log() LogResolver
	Query() QueryResolver
	Receipt() ReceiptResolver
	Transaction() TransactionResolver
}

type TransactionResolver

type TransactionResolver interface {
	Logs(ctx context.Context, obj *model.Transaction) ([]*model.Log, error)
	Receipt(ctx context.Context, obj *model.Transaction) (*model.Receipt, error)
	JSON(ctx context.Context, obj *model.Transaction) (types.JSON, error)
}

Jump to

Keyboard shortcuts

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