generated

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 12 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 {
	Mutation struct {
		JoinSession  func(childComplexity int, name string, code string) int
		StartSession func(childComplexity int) int
	}

	Participant struct {
		Name    func(childComplexity int) int
		Session func(childComplexity int) int
	}

	Query struct {
		Sessions func(childComplexity int) int
	}

	Session struct {
		Code func(childComplexity int) int
		ID   func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	StartSession(ctx context.Context) (*models.Session, error)
	JoinSession(ctx context.Context, name string, code string) (*models.Participant, error)
}

type QueryResolver

type QueryResolver interface {
	Sessions(ctx context.Context) ([]*models.Session, error)
}

type ResolverRoot

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

Jump to

Keyboard shortcuts

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