scalars

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 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.

func UnmarshalSearchArgs

func UnmarshalSearchArgs(v interface{}) (model.SearchArgs, error)

Types

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	User(ctx context.Context, id external.ObjectID) (*model.User, error)
	Search(ctx context.Context, input model.SearchArgs) ([]model.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 UserResolver

type UserResolver interface {
	PrimitiveResolver(ctx context.Context, obj *model.User) (string, error)
	CustomResolver(ctx context.Context, obj *model.User) (model.Point, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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