generated

package
v0.0.0-...-649a0e1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 15 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 {
	Employee struct {
		FieldThrowsError func(childComplexity int) int
		ID               func(childComplexity int) int
	}

	Entity struct {
		FindEmployeeByID func(childComplexity int, id int) int
	}

	Query struct {
		Delay            func(childComplexity int, response string, ms int) int
		HeaderValue      func(childComplexity int, name string) int
		InitPayloadValue func(childComplexity int, key string) int
		InitialPayload   func(childComplexity int) int
		// contains filtered or unexported fields
	}

	Subscription struct {
		HeaderValue      func(childComplexity int, name string, repeat *int) int
		InitPayloadValue func(childComplexity int, key string, repeat *int) int
		InitialPayload   func(childComplexity int, repeat *int) int
		ReturnsError     func(childComplexity int) int
	}

	TimestampedString struct {
		InitialPayload func(childComplexity int) int
		Seq            func(childComplexity int) int
		Total          func(childComplexity int) int
		UnixTime       func(childComplexity int) int
		Value          func(childComplexity int) int
	}
	// contains filtered or unexported fields
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
}

type EntityResolver

type EntityResolver interface {
	FindEmployeeByID(ctx context.Context, id int) (*model.Employee, error)
}

type QueryResolver

type QueryResolver interface {
	HeaderValue(ctx context.Context, name string) (string, error)
	InitPayloadValue(ctx context.Context, key string) (string, error)
	InitialPayload(ctx context.Context) (map[string]interface{}, error)
	Delay(ctx context.Context, response string, ms int) (string, error)
}

type ResolverRoot

type ResolverRoot interface {
	Entity() EntityResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type SubscriptionResolver

type SubscriptionResolver interface {
	HeaderValue(ctx context.Context, name string, repeat *int) (<-chan *model.TimestampedString, error)
	InitPayloadValue(ctx context.Context, key string, repeat *int) (<-chan *model.TimestampedString, error)
	InitialPayload(ctx context.Context, repeat *int) (<-chan map[string]interface{}, error)
	ReturnsError(ctx context.Context) (<-chan *string, error)
}

Jump to

Keyboard shortcuts

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