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

graph

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 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 {
	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
		TestCaseRunID func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
	}

	TestCaseRun 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
	}

	TestCaseRunConnection 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.TestCaseRun, error)
	TestCases(ctx context.Context, filter *model.TestCaseFilter, limit *int, offset *int) (*model.TestCaseRunConnection, error)
	Step(ctx context.Context, id string) (*models.StepRun, 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) TestCaseRun

func (r *Resolver) TestCaseRun() TestCaseRunResolver

TestCaseRun returns TestCaseRunResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
	StepRun() StepRunResolver
	TestCaseRun() TestCaseRunResolver
}

type StepRunResolver

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

	TestCase(ctx context.Context, obj *models.StepRun) (*models.TestCaseRun, error)
}

type TestCaseRunResolver

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

	Steps(ctx context.Context, obj *models.TestCaseRun) ([]*models.StepRun, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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