Help us shape the future of Go! Take the 2026 Go Developer Survey

graph

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestConnectionImplementors = []string{"TestConnection"}
View Source
var TestImplementors = []string{"Test"}

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	PageInfo struct {
		HasNextPage func(childComplexity int) int
		TotalCount  func(childComplexity int) int
	}

	Query struct {
		RunStats  func(childComplexity int, runID string) int
		Step      func(childComplexity int, id string) int
		TestCase  func(childComplexity int, id string) int
		TestCases func(childComplexity int, filter *model.TestCaseFilter, limit *int, offset *int) int
		TestRuns  func(childComplexity int, limit *int, offset *int) int
	}

	RunStats struct {
		FailedTests  func(childComplexity int) int
		LatestUpdate func(childComplexity int) int
		PassedTests  func(childComplexity int) int
		SkippedTests func(childComplexity int) int
		TotalSteps   func(childComplexity int) int
		TotalTests   func(childComplexity int) int
	}

	StepRun struct {
		CreatedAt func(childComplexity int) int
		Error     func(childComplexity int) int
		ID        func(childComplexity int) int
		Metadata  func(childComplexity int) int
		RunID     func(childComplexity int) int
		Status    func(childComplexity int) int
		TestCase  func(childComplexity int) int
		TestID    func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
	}

	Test struct {
		CreatedAt func(childComplexity int) int
		Error     func(childComplexity int) int
		ID        func(childComplexity int) int
		Metadata  func(childComplexity int) int
		RunID     func(childComplexity int) int
		Status    func(childComplexity int) int
		Steps     func(childComplexity int) int
		Title     func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
	}

	TestConnection struct {
		Nodes    func(childComplexity int) int
		PageInfo func(childComplexity int) 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 {
	TestCase(ctx context.Context, id string) (*models.Test, error)
	TestCases(ctx context.Context, filter *model.TestCaseFilter, limit *int, offset *int) (*model.TestCaseConnection, error)
	Step(ctx context.Context, id string) (*models.StepDocument, error)
	TestRuns(ctx context.Context, limit *int, offset *int) ([]string, error)
	RunStats(ctx context.Context, runID string) (*model.RunStats, error)
}

type Resolver

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

Resolver is the root resolver for GraphQL queries. GraphQL is currently a stub and does not bind to an active persistence backend.

func NewResolver

func NewResolver(logger *slog.Logger) *Resolver

NewResolver creates a new GraphQL resolver.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

func (*Resolver) StepRun

func (r *Resolver) StepRun() StepRunResolver

StepRun returns StepRunResolver implementation.

func (*Resolver) Test added in v0.2.4

func (r *Resolver) Test() TestResolver

Test returns TestResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	StepRun() StepRunResolver
	Test() TestResolver
}

type StepRunResolver

type StepRunResolver interface {
	Metadata(ctx context.Context, obj *models.StepDocument) (*string, error)
	Error(ctx context.Context, obj *models.StepDocument) (*string, error)

	TestCase(ctx context.Context, obj *models.StepDocument) (*models.Test, error)
}

type TestResolver added in v0.2.4

type TestResolver interface {
	Metadata(ctx context.Context, obj *models.Test) (*string, error)
	Error(ctx context.Context, obj *models.Test) (*string, error)

	Steps(ctx context.Context, obj *models.Test) ([]*models.StepDocument, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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