graph

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 26 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 {
	AccessTuple struct {
		Address     func(childComplexity int) int
		StorageKeys func(childComplexity int) int
	}

	Account struct {
		Address          func(childComplexity int) int
		Balance          func(childComplexity int) int
		Code             func(childComplexity int) int
		Storage          func(childComplexity int, slot string) int
		TransactionCount func(childComplexity int) int
	}

	Block struct {
		Account           func(childComplexity int, address string) int
		BaseFeePerGas     func(childComplexity int) int
		Call              func(childComplexity int, data model.CallData) int
		Difficulty        func(childComplexity int) int
		EstimateGas       func(childComplexity int, data model.CallData) int
		ExtraData         func(childComplexity int) int
		GasLimit          func(childComplexity int) int
		GasUsed           func(childComplexity int) int
		Hash              func(childComplexity int) int
		Logs              func(childComplexity int, filter model.BlockFilterCriteria) int
		LogsBloom         func(childComplexity int) int
		Miner             func(childComplexity int, block *uint64) int
		MixHash           func(childComplexity int) int
		NextBaseFeePerGas func(childComplexity int) int
		Nonce             func(childComplexity int) int
		Number            func(childComplexity int) int
		OmmerAt           func(childComplexity int, index int) int
		OmmerCount        func(childComplexity int) int
		OmmerHash         func(childComplexity int) int
		Ommers            func(childComplexity int) int
		Parent            func(childComplexity int) int
		Raw               func(childComplexity int) int
		RawHeader         func(childComplexity int) int
		ReceiptsRoot      func(childComplexity int) int
		StateRoot         func(childComplexity int) int
		Timestamp         func(childComplexity int) int
		TotalDifficulty   func(childComplexity int) int
		TransactionAt     func(childComplexity int, index int) int
		TransactionCount  func(childComplexity int) int
		Transactions      func(childComplexity int) int
		TransactionsRoot  func(childComplexity int) int
	}

	CallResult struct {
		Data    func(childComplexity int) int
		GasUsed func(childComplexity int) int
		Status  func(childComplexity int) int
	}

	Log struct {
		Account     func(childComplexity int, block *uint64) int
		Data        func(childComplexity int) int
		Index       func(childComplexity int) int
		Topics      func(childComplexity int) int
		Transaction func(childComplexity int) int
	}

	Mutation struct {
		SendRawTransaction func(childComplexity int, data string) int
	}

	Pending struct {
		Account          func(childComplexity int, address string) int
		Call             func(childComplexity int, data model.CallData) int
		EstimateGas      func(childComplexity int, data model.CallData) int
		TransactionCount func(childComplexity int) int
		Transactions     func(childComplexity int) int
	}

	Query struct {
		Block                func(childComplexity int, number *string, hash *string) int
		Blocks               func(childComplexity int, from *uint64, to *uint64) int
		ChainID              func(childComplexity int) int
		GasPrice             func(childComplexity int) int
		Logs                 func(childComplexity int, filter model.FilterCriteria) int
		MaxPriorityFeePerGas func(childComplexity int) int
		Pending              func(childComplexity int) int
		Syncing              func(childComplexity int) int
		Transaction          func(childComplexity int, hash string) int
	}

	SyncState struct {
		CurrentBlock  func(childComplexity int) int
		HighestBlock  func(childComplexity int) int
		StartingBlock func(childComplexity int) int
	}

	Transaction struct {
		AccessList           func(childComplexity int) int
		Block                func(childComplexity int) int
		CreatedContract      func(childComplexity int, block *uint64) int
		CumulativeGasUsed    func(childComplexity int) int
		EffectiveGasPrice    func(childComplexity int) int
		EffectiveTip         func(childComplexity int) int
		From                 func(childComplexity int, block *uint64) int
		Gas                  func(childComplexity int) int
		GasPrice             func(childComplexity int) int
		GasUsed              func(childComplexity int) int
		Hash                 func(childComplexity int) int
		Index                func(childComplexity int) int
		InputData            func(childComplexity int) int
		Logs                 func(childComplexity int) int
		MaxFeePerGas         func(childComplexity int) int
		MaxPriorityFeePerGas func(childComplexity int) int
		Nonce                func(childComplexity int) int
		R                    func(childComplexity int) int
		Raw                  func(childComplexity int) int
		RawReceipt           func(childComplexity int) int
		S                    func(childComplexity int) int
		Status               func(childComplexity int) int
		To                   func(childComplexity int, block *uint64) int
		Type                 func(childComplexity int) int
		V                    func(childComplexity int) int
		Value                func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	SendRawTransaction(ctx context.Context, data string) (string, error)
}

type QueryResolver

type QueryResolver interface {
	Block(ctx context.Context, number *string, hash *string) (*model.Block, error)
	Blocks(ctx context.Context, from *uint64, to *uint64) ([]*model.Block, error)
	Pending(ctx context.Context) (*model.Pending, error)
	Transaction(ctx context.Context, hash string) (*model.Transaction, error)
	Logs(ctx context.Context, filter model.FilterCriteria) ([]*model.Log, error)
	GasPrice(ctx context.Context) (string, error)
	MaxPriorityFeePerGas(ctx context.Context) (string, error)
	Syncing(ctx context.Context) (*model.SyncState, error)
	ChainID(ctx context.Context) (string, error)
}

type Resolver

type Resolver struct {
	GraphQLAPI jsonrpc.GraphQLAPI
	// contains filtered or unexported fields
}

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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