api

package
v0.0.0-...-4b559b3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT 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 {
	Query struct {
		Bool   func(childComplexity int, typedN *model.BoolTyped, untypedN *bool, typed model.BoolTyped, untyped bool) int
		Int    func(childComplexity int, typedN *model.IntTyped, untypedN *int, typed model.IntTyped, untyped int) int
		String func(childComplexity int, typedN *model.StringTyped, untypedN *string, typed model.StringTyped, untyped string) int
	}
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	Int(ctx context.Context, typedN *model.IntTyped, untypedN *int, typed model.IntTyped, untyped int) ([]model.IntTyped, error)
	String(ctx context.Context, typedN *model.StringTyped, untypedN *string, typed model.StringTyped, untyped string) ([]model.StringTyped, error)
	Bool(ctx context.Context, typedN *model.BoolTyped, untypedN *bool, typed model.BoolTyped, untyped bool) ([]model.BoolTyped, error)
}

type Resolver

type Resolver struct{}

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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