generated

package
v0.0.0-...-d259e94 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 10 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 {
	Category struct {
		Courses     func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
	}

	Chapter struct {
		Category    func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
	}

	Course struct {
		Category    func(childComplexity int) int
		Courses     func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
	}

	Mutation struct {
		CreateCategory func(childComplexity int, input model.NewCategory) int
		CreateChapter  func(childComplexity int, input model.NewChapter) int
		CreateCourse   func(childComplexity int, input model.NewCourse) int
	}

	Query struct {
		Categories func(childComplexity int) int
		Chapters   func(childComplexity int) int
		Courses    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 {
	CreateCategory(ctx context.Context, input model.NewCategory) (*model.Category, error)
	CreateCourse(ctx context.Context, input model.NewCourse) (*model.Course, error)
	CreateChapter(ctx context.Context, input model.NewChapter) (*model.Chapter, error)
}

type QueryResolver

type QueryResolver interface {
	Categories(ctx context.Context) ([]*model.Category, error)
	Courses(ctx context.Context) ([]*model.Course, error)
	Chapters(ctx context.Context) ([]*model.Chapter, 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