issue

package module
v0.0.0-...-2a3eea3 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 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 {
	Query struct {
		Users func(childComplexity int) int
	}

	User struct {
		Friends  func(childComplexity int, filter Filter) int
		Location func(childComplexity int) int
		Name     func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Filter

type Filter struct {
	Location string `json:"location"`
}

type QueryResolver

type QueryResolver interface {
	Users(ctx context.Context) ([]*User, error)
}

type Resolver

type Resolver struct{}

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

func (*Resolver) User

func (r *Resolver) User() UserResolver

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	User() UserResolver
}

type User

type User struct {
	Name     string
	Location string
}

type UserResolver

type UserResolver interface {
	Friends(ctx context.Context, obj *User, filter Filter) ([]*User, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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