graph

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Object struct {
		ID            func(childComplexity int) int
		RequestFields func(childComplexity int) int
		Type          func(childComplexity int) int
	}

	Query struct {
		SearchObjects func(childComplexity int, query string, objectTypes []string, requestFields []string) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type JSON

type JSON map[string]interface{}

func (JSON) MarshalGQL

func (j JSON) MarshalGQL(w io.Writer)

MarshalGQL serializes JSON into format used by GraphQL

func (*JSON) UnmarshalGQL

func (j *JSON) UnmarshalGQL(v interface{}) error

UnmarshalGQL deserializes from GraphQL format into JSON

type QueryResolver

type QueryResolver interface {
	SearchObjects(ctx context.Context, query string, objectTypes []string, requestFields []string) ([]*model.Object, error)
}

type Resolver

type Resolver struct{}

This file will not be regenerated automatically.

It serves as dependency injection for your app, add any dependencies you require here.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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