gql

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 17 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 {
	Config struct {
		BaseURL func(childComplexity int) int
	}

	Header struct {
		Name  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Invocation struct {
		ID              func(childComplexity int) int
		Method          func(childComplexity int) int
		Received        func(childComplexity int) int
		RequestBody     func(childComplexity int) int
		RequestHeaders  func(childComplexity int) int
		ResponseBody    func(childComplexity int) int
		ResponseHeaders func(childComplexity int) int
		Started         func(childComplexity int) int
		Status          func(childComplexity int) int
		URL             func(childComplexity int) int
	}

	Mutation struct {
		MakeBrowserInvocation func(childComplexity int, input schema.BrowserInvocationInput) int
		MakeServerInvocation  func(childComplexity int, input schema.ServerInvocationInput) int
	}

	Query struct {
		GetConfig       func(childComplexity int) int
		GetInvocation   func(childComplexity int, id string) int
		ListInvocations func(childComplexity int) int
	}

	Subscription struct {
		SubscribeInvocations 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 {
	MakeServerInvocation(ctx context.Context, input schema.ServerInvocationInput) (bool, error)
	MakeBrowserInvocation(ctx context.Context, input schema.BrowserInvocationInput) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	GetConfig(ctx context.Context) (*schema.Config, error)
	ListInvocations(ctx context.Context) ([]*schema.Invocation, error)
	GetInvocation(ctx context.Context, id string) (*schema.Invocation, error)
}

type Resolver

type Resolver struct {
	Repos repository.Repos
}

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

func (*Resolver) Subscription

func (r *Resolver) Subscription() SubscriptionResolver

type ResolverRoot

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

type SubscriptionResolver

type SubscriptionResolver interface {
	SubscribeInvocations(ctx context.Context) (<-chan []*schema.Invocation, error)
}

Jump to

Keyboard shortcuts

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