generated

package
v0.0.0-...-c46e59b Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 12 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 {
	Node struct {
		AddIncomingNode func(childComplexity int, relation string, properties map[string]interface{}, addNode model.AddNode) int
		AddOutboundNode func(childComplexity int, relation string, properties map[string]interface{}, addNode model.AddNode) int
		AddRelation     func(childComplexity int, direction *model.Direction, relation string, properties map[string]interface{}, nodeKey model.Key) int
		DelProperty     func(childComplexity int, key string) int
		DelRelation     func(childComplexity int, key model.Key) int
		GetProperty     func(childComplexity int, key string) int
		GetRelation     func(childComplexity int, relation string, id string) int
		ID              func(childComplexity int) int
		Properties      func(childComplexity int) int
		Relations       func(childComplexity int, where model.RelationWhere) int
		SetProperties   func(childComplexity int, properties map[string]interface{}) int
		Type            func(childComplexity int) int
	}

	Nodes struct {
		Agg    func(childComplexity int, fn model.AggregateFunction, field string) int
		Cursor func(childComplexity int) int
		Values func(childComplexity int) int
	}

	Query struct {
		Add     func(childComplexity int, add model.AddNode) int
		BulkAdd func(childComplexity int, add []*model.AddNode) int
		BulkDel func(childComplexity int, del []*model.Key) int
		BulkSet func(childComplexity int, set []*model.SetNode) int
		Del     func(childComplexity int, del model.Key) int
		Get     func(childComplexity int, key model.Key) int
		List    func(childComplexity int, where model.NodeWhere) int
		Login   func(childComplexity int, username string, password string) int
		Set     func(childComplexity int, set model.SetNode) int
		Types   func(childComplexity int) int
	}

	Relation struct {
		DelProperty   func(childComplexity int, key string) int
		GetProperty   func(childComplexity int, key string) int
		ID            func(childComplexity int) int
		Properties    func(childComplexity int) int
		SetProperties func(childComplexity int, properties map[string]interface{}) int
		Source        func(childComplexity int) int
		Target        func(childComplexity int) int
		Type          func(childComplexity int) int
	}

	Relations struct {
		Agg    func(childComplexity int, fn model.AggregateFunction, field string) int
		Cursor func(childComplexity int) int
		Values func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type NodeResolver

type NodeResolver interface {
	Properties(ctx context.Context, obj *model.Node) (map[string]interface{}, error)
	GetProperty(ctx context.Context, obj *model.Node, key string) (interface{}, error)
	SetProperties(ctx context.Context, obj *model.Node, properties map[string]interface{}) (bool, error)

	GetRelation(ctx context.Context, obj *model.Node, relation string, id string) (*model.Relation, error)
	AddRelation(ctx context.Context, obj *model.Node, direction *model.Direction, relation string, properties map[string]interface{}, nodeKey model.Key) (*model.Relation, error)
	DelRelation(ctx context.Context, obj *model.Node, key model.Key) (bool, error)
	Relations(ctx context.Context, obj *model.Node, where model.RelationWhere) (*model.Relations, error)
	AddIncomingNode(ctx context.Context, obj *model.Node, relation string, properties map[string]interface{}, addNode model.AddNode) (*model.Node, error)
	AddOutboundNode(ctx context.Context, obj *model.Node, relation string, properties map[string]interface{}, addNode model.AddNode) (*model.Node, error)
}

type NodesResolver

type NodesResolver interface {
	Agg(ctx context.Context, obj *model.Nodes, fn model.AggregateFunction, field string) (float64, error)
}

type QueryResolver

type QueryResolver interface {
	Types(ctx context.Context) ([]string, error)
	Get(ctx context.Context, key model.Key) (*model.Node, error)
	List(ctx context.Context, where model.NodeWhere) (*model.Nodes, error)
	Add(ctx context.Context, add model.AddNode) (*model.Node, error)
	Set(ctx context.Context, set model.SetNode) (*model.Node, error)
	Del(ctx context.Context, del model.Key) (bool, error)
	BulkAdd(ctx context.Context, add []*model.AddNode) (bool, error)
	BulkSet(ctx context.Context, set []*model.SetNode) (bool, error)
	BulkDel(ctx context.Context, del []*model.Key) (bool, error)
	Login(ctx context.Context, username string, password string) (string, error)
}

type RelationResolver

type RelationResolver interface {
	Properties(ctx context.Context, obj *model.Relation) (map[string]interface{}, error)
	GetProperty(ctx context.Context, obj *model.Relation, key string) (interface{}, error)
	SetProperties(ctx context.Context, obj *model.Relation, properties map[string]interface{}) (bool, error)
}

type RelationsResolver

type RelationsResolver interface {
	Agg(ctx context.Context, obj *model.Relations, fn model.AggregateFunction, field string) (float64, error)
}

type ResolverRoot

type ResolverRoot interface {
	Node() NodeResolver
	Nodes() NodesResolver
	Query() QueryResolver
	Relation() RelationResolver
	Relations() RelationsResolver
}

Jump to

Keyboard shortcuts

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