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 { DestinationInfo struct { BlockNumber func(childComplexity int) int ChainID func(childComplexity int) int ContractAddress func(childComplexity int) int MessageHash func(childComplexity int) int MessageStatus func(childComplexity int) int OriginInfo func(childComplexity int) int RemoteDomain func(childComplexity int) int Success func(childComplexity int) int TxHash func(childComplexity int) int TxIndex func(childComplexity int) int } MessageStatus struct { DestinationInfo func(childComplexity int) int DestinationTxHash func(childComplexity int) int LastSeen func(childComplexity int) int MessageHash func(childComplexity int) int OriginInfo func(childComplexity int) int OriginTxHash func(childComplexity int) int } OriginInfo struct { AttestationTip func(childComplexity int) int BlockNumber func(childComplexity int) int ContractAddress func(childComplexity int) int DeliveryTip func(childComplexity int) int DestinationChainID func(childComplexity int) int DestinationInfo func(childComplexity int) int ExecutionTip func(childComplexity int) int GasDrop func(childComplexity int) int GasLimit func(childComplexity int) int Message func(childComplexity int) int MessageFlag func(childComplexity int) int MessageHash func(childComplexity int) int MessageStatus func(childComplexity int) int Nonce func(childComplexity int) int OptimisticSeconds func(childComplexity int) int OriginChainID func(childComplexity int) int OriginTxHash func(childComplexity int) int Recipient func(childComplexity int) int Sender func(childComplexity int) int SummitTip func(childComplexity int) int Version func(childComplexity int) int } Query struct { GetDestinationInfo func(childComplexity int, messageHash *string, txHash *string, chainID *int) int GetMessageStatus func(childComplexity int, messageHash *string, originChainID *int, originTxHash *string) int GetMessagesByStatus func(childComplexity int, messageStatus model.MessageState, page int) int GetOriginInfo func(childComplexity int, messageHash *string, txHash *string, chainID *int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DestinationInfoResolver ¶
type DestinationInfoResolver interface { MessageStatus(ctx context.Context, obj *model.DestinationInfo) (*model.MessageStatus, error) OriginInfo(ctx context.Context, obj *model.DestinationInfo) ([]*model.OriginInfo, error) }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MessageStatusResolver ¶
type MessageStatusResolver interface { OriginInfo(ctx context.Context, obj *model.MessageStatus) ([]*model.OriginInfo, error) DestinationInfo(ctx context.Context, obj *model.MessageStatus) ([]*model.DestinationInfo, error) }
type OriginInfoResolver ¶
type OriginInfoResolver interface { MessageStatus(ctx context.Context, obj *model.OriginInfo) (*model.MessageStatus, error) DestinationInfo(ctx context.Context, obj *model.OriginInfo) ([]*model.DestinationInfo, error) }
type QueryResolver ¶
type QueryResolver interface { GetMessageStatus(ctx context.Context, messageHash *string, originChainID *int, originTxHash *string) (*model.MessageStatus, error) GetMessagesByStatus(ctx context.Context, messageStatus model.MessageState, page int) ([]*model.MessageStatus, error) GetOriginInfo(ctx context.Context, messageHash *string, txHash *string, chainID *int) ([]*model.OriginInfo, error) GetDestinationInfo(ctx context.Context, messageHash *string, txHash *string, chainID *int) ([]*model.DestinationInfo, error) }
type ResolverRoot ¶
type ResolverRoot interface { DestinationInfo() DestinationInfoResolver MessageStatus() MessageStatusResolver OriginInfo() OriginInfoResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.