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 MutationResolver ¶
type MutationResolver interface {
AddFact(ctx context.Context, fact model.TopSecretFactInput) (model.TopSecretFact, error)
}
type QueriesResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Documentation() DocumentationResolver Entity() EntityResolver Mutation() MutationResolver Queries() QueriesResolver }
Click to show internal directories.
Click to hide internal directories.