generated

package
v0.0.0-...-f8c46ef Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 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 {
	Comment struct {
		Body   func(childComplexity int) int
		Email  func(childComplexity int) int
		ID     func(childComplexity int) int
		Name   func(childComplexity int) int
		PostID func(childComplexity int) int
	}

	Post struct {
		Body   func(childComplexity int) int
		ID     func(childComplexity int) int
		Title  func(childComplexity int) int
		UserID func(childComplexity int) int
	}

	Query struct {
		PostByID             func(childComplexity int, id int) int
		PostByIDWithComments func(childComplexity int, id int) int
		Posts                func(childComplexity int) int
		PostsFromDb          func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	Posts(ctx context.Context) ([]*model.Post, error)
	PostsFromDb(ctx context.Context) ([]*model.Post, error)
	PostByID(ctx context.Context, id int) (*model.Post, error)
	PostByIDWithComments(ctx context.Context, id int) ([]*model.Comment, error)
}

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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