gql

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown type")
	ErrTypeNotFound = errors.New("type not found")
)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Channel struct {
		Config func(childComplexity int) int
		Height func(childComplexity int) int
		Name   func(childComplexity int) int
	}

	Mutation struct {
		SyncChannel func(childComplexity int, channelConfig string, saveOrderer bool, saveApplication bool, joinOrderers bool, joinPeers bool) int
	}

	Query struct {
		Channel func(childComplexity int, name string, mspID string, user string) int
		// contains filtered or unexported fields
	}

	SyncChannelResponse struct {
		ApplicationTxID func(childComplexity int) int
		OrdererTxID     func(childComplexity int) int
		OrderersJoined  func(childComplexity int) int
		PeersJoined     func(childComplexity int) int
		Success         func(childComplexity int) int
	}
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	SyncChannel(ctx context.Context, channelConfig string, saveOrderer bool, saveApplication bool, joinOrderers bool, joinPeers bool) (*models.SyncChannelResponse, error)
}

type QueryResolver

type QueryResolver interface {
	Channel(ctx context.Context, name string, mspID string, user string) (*models.Channel, error)
}

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