generated

package
v0.0.0-...-005b4b2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 11 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 {
	Audio struct {
		ID    func(childComplexity int) int
		Title func(childComplexity int) int
		URL   func(childComplexity int) int
	}

	Mutation struct {
		CreateAudio func(childComplexity int, input model.NewAudio) int
		CreateVideo func(childComplexity int, input model.NewVideo) int
	}

	Query struct {
		Audios func(childComplexity int) int
		Videos func(childComplexity int) int
	}

	User struct {
		ID   func(childComplexity int) int
		Name func(childComplexity int) int
	}

	Video struct {
		Author func(childComplexity int) int
		ID     func(childComplexity int) int
		Title  func(childComplexity int) int
		URL    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 {
	CreateVideo(ctx context.Context, input model.NewVideo) (*model.Video, error)
	CreateAudio(ctx context.Context, input model.NewAudio) (*model.Audio, error)
}

type QueryResolver

type QueryResolver interface {
	Videos(ctx context.Context) ([]*model.Video, error)
	Audios(ctx context.Context) ([]*model.Audio, 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