graph

package
v2.2.0-alpha28 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package graph provides the resolver implementation for the GraphQL schema.

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 {
	Mutation struct {
		RunTestSet func(childComplexity int, testSetID string, testRunID string, appID int) int
		StartApp   func(childComplexity int, appID int) int
		StartHooks func(childComplexity int) int
		StopApp    func(childComplexity int, appID int) int
		StopHooks  func(childComplexity int) int
	}

	Query struct {
		TestSetStatus func(childComplexity int, testRunID string, testSetID string) int
		TestSets      func(childComplexity int) int
	}

	TestRunInfo struct {
		AppID     func(childComplexity int) int
		TestRunID func(childComplexity int) int
	}

	TestSetStatus struct {
		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 Graph

type Graph struct {
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(logger *zap.Logger, replay replay.Service, config config.Config) *Graph

func (*Graph) Serve

func (g *Graph) Serve(ctx context.Context) error

type MutationResolver

type MutationResolver interface {
	RunTestSet(ctx context.Context, testSetID string, testRunID string, appID int) (bool, error)
	StartHooks(ctx context.Context) (*model.TestRunInfo, error)
	StartApp(ctx context.Context, appID int) (bool, error)
	StopHooks(ctx context.Context) (bool, error)
	StopApp(ctx context.Context, appID int) (bool, error)
}

type QueryResolver

type QueryResolver interface {
	TestSets(ctx context.Context) ([]string, error)
	TestSetStatus(ctx context.Context, testRunID string, testSetID string) (*model.TestSetStatus, error)
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

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