generated

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 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 {
	Message struct {
		ID        func(childComplexity int) int
		Text      func(childComplexity int) int
		Timestamp func(childComplexity int) int
	}

	Mutation struct {
		AddMessage func(childComplexity int, channel string, message string) int
	}

	Query struct {
		Ping func(childComplexity int) int
	}

	Subscription struct {
		MessageAdded func(childComplexity int, channel string) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	AddMessage(ctx context.Context, channel string, message string) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Ping(ctx context.Context) (string, error)
}

type ResolverRoot

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

type SubscriptionResolver

type SubscriptionResolver interface {
	MessageAdded(ctx context.Context, channel string) (<-chan *types.Message, error)
}

Jump to

Keyboard shortcuts

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