gqlserver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAssets

func HandleAssets(li lib.Lib) http.HandlerFunc

func HandleGQL

func HandleGQL(c lib.Lib) http.HandlerFunc

func HandlePlayground

func HandlePlayground() http.HandlerFunc

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Health struct {
		Code func(childComplexity int) int
		Ok   func(childComplexity int) int
		Time func(childComplexity int) int
	}

	Mutation struct {
		Completed func(childComplexity int) int
		Log       func(childComplexity int, input model.LogInput) int
		Register  func(childComplexity int) int
	}

	Query struct {
		Health func(childComplexity int) int
		Task   func(childComplexity int) int
	}

	Task struct {
		Cmd    func(childComplexity int) int
		Status func(childComplexity int) int
	}
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	Register(ctx context.Context) (bool, error)
	Completed(ctx context.Context) (bool, error)
	Log(ctx context.Context, input model.LogInput) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	Health(ctx context.Context) (*model.Health, error)
	Task(ctx context.Context) (*model.Task, error)
}

type Resolver

type Resolver struct {
	lib.Lib
}

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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