generated

package
v0.0.0-...-4acccc1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown type")
	ErrTypeNotFound = errors.New("type not found")
)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Consultancy struct {
		Name func(childComplexity int) int
		Upc  func(childComplexity int) int
	}

	Cosmo struct {
		Name          func(childComplexity int) int
		RepositoryURL func(childComplexity int) int
		Upc           func(childComplexity int) int
	}

	DirectiveFact struct {
		Description func(childComplexity int) int
		FactType    func(childComplexity int) int
		Title       func(childComplexity int) int
	}

	Documentation struct {
		URL  func(childComplexity int, product model.ProductName) int
		Urls func(childComplexity int, products []model.ProductName) int
	}

	Employee struct {
		ID       func(childComplexity int) int
		Notes    func(childComplexity int) int
		Products func(childComplexity int) int
	}

	Entity struct {
		FindConsultancyByUpc func(childComplexity int, upc string) int
		FindCosmoByUpc       func(childComplexity int, upc string) int
		FindEmployeeByID     func(childComplexity int, id int) int
	}

	EntityFact struct {
		Description func(childComplexity int) int
		FactType    func(childComplexity int) int
		Title       func(childComplexity int) int
	}

	MiscellaneousFact struct {
		Description func(childComplexity int) int
		FactType    func(childComplexity int) int
		Title       func(childComplexity int) int
	}

	Mutation struct {
		AddFact func(childComplexity int, fact model.TopSecretFactInput) int
	}

	Queries struct {
		FactTypes                func(childComplexity int) int
		ProductTypes             func(childComplexity int) int
		TopSecretFederationFacts func(childComplexity int) int
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
}

type DocumentationResolver

type DocumentationResolver interface {
	URL(ctx context.Context, obj *model.Documentation, product model.ProductName) (string, error)
	Urls(ctx context.Context, obj *model.Documentation, products []model.ProductName) ([]string, error)
}

type EntityResolver

type EntityResolver interface {
	FindConsultancyByUpc(ctx context.Context, upc string) (*model.Consultancy, error)
	FindCosmoByUpc(ctx context.Context, upc string) (*model.Cosmo, error)
	FindEmployeeByID(ctx context.Context, id int) (*model.Employee, error)
}

type MutationResolver

type MutationResolver interface {
	AddFact(ctx context.Context, fact model.TopSecretFactInput) (model.TopSecretFact, error)
}

type QueriesResolver

type QueriesResolver interface {
	ProductTypes(ctx context.Context) ([]model.Products, error)
	TopSecretFederationFacts(ctx context.Context) ([]model.TopSecretFact, error)
	FactTypes(ctx context.Context) ([]model.TopSecretFactType, error)
}

type ResolverRoot

type ResolverRoot interface {
	Documentation() DocumentationResolver
	Entity() EntityResolver
	Mutation() MutationResolver
	Queries() QueriesResolver
}

Jump to

Keyboard shortcuts

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