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 { CreateEdge func(childComplexity int, edge NewEdge) int CreateNode func(childComplexity int, node NewNode) int } Node struct { Children func(childComplexity int) int ID func(childComplexity int) int Parent func(childComplexity int) int } Query struct { Get func(childComplexity int, id string) int List func(childComplexity int, skip *int, take *int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type NodeResolver ¶
type NodeResolver interface { Parent(ctx context.Context, obj *graphstore.Node) (*graphstore.Node, error) Children(ctx context.Context, obj *graphstore.Node) ([]graphstore.Node, error) }
type QueryResolver ¶
type Resolver ¶
type Resolver struct {
Store *graphstore.Store
}
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Node ¶
func (r *Resolver) Node() NodeResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Node() NodeResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.