generated

package
v0.0.0-...-3ca74ef Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT 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 {
	Mutation struct {
		CreateSurvey func(childComplexity int, input *model.SurveyInput) int
		DeleteSurvey func(childComplexity int, id string) int
		UpdateSurvey func(childComplexity int, id string, input *model.SurveyInput) int
	}

	Query struct {
		Survey  func(childComplexity int, id string) int
		Surveys func(childComplexity int) int
	}

	Question struct {
		InputSpec func(childComplexity int) int
		InputType func(childComplexity int) int
		Title     func(childComplexity int) int
	}

	Survey struct {
		ID        func(childComplexity int) int
		IsDeleted func(childComplexity int) int
		Questions func(childComplexity int) int
		Title     func(childComplexity int) int
		Token     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 {
	CreateSurvey(ctx context.Context, input *model.SurveyInput) (*model.Survey, error)
	UpdateSurvey(ctx context.Context, id string, input *model.SurveyInput) (*model.Survey, error)
	DeleteSurvey(ctx context.Context, id string) (*model.Survey, error)
}

type QueryResolver

type QueryResolver interface {
	Survey(ctx context.Context, id string) (*model.Survey, error)
	Surveys(ctx context.Context) ([]*model.Survey, 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