Documentation ¶
Index ¶
- Variables
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type EmployeeResolver
- type EngineerResolver
- type EntityResolver
- type ErrorWrapperResolver
- type MarketerResolver
- type MutationResolver
- type OperatorResolver
- type QueryResolver
- type ResolverRoot
- type SubscriptionResolver
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 { City struct { Country func(childComplexity int) int Name func(childComplexity int) int Type func(childComplexity int) int } Consultancy struct { IsLeadAvailable func(childComplexity int) int Lead func(childComplexity int) int Upc func(childComplexity int) int } Cosmo struct { Engineers func(childComplexity int) int Lead func(childComplexity int) int Upc func(childComplexity int) int } Country struct { Key func(childComplexity int) int } CountryKey struct { Name func(childComplexity int) int } Details struct { Forename func(childComplexity int) int Location func(childComplexity int) int PastLocations func(childComplexity int) int Surname func(childComplexity int) int } Employee struct { CurrentMood func(childComplexity int) int DerivedMood func(childComplexity int) int Details func(childComplexity int) int ID func(childComplexity int) int IsAvailable func(childComplexity int) int Notes func(childComplexity int) int Role func(childComplexity int) int RootFieldErrorWrapper func(childComplexity int) int RootFieldThrowsError func(childComplexity int) int StartDate func(childComplexity int) int Tag func(childComplexity int) int UpdatedAt func(childComplexity int) int } Engineer struct { Departments func(childComplexity int) int Employees func(childComplexity int) int EngineerType func(childComplexity int) int Title 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 FindSDKByUpc func(childComplexity int, upc string) int } ErrorWrapper struct { ErrorField func(childComplexity int) int OkField func(childComplexity int) int } Marketer struct { Departments func(childComplexity int) int Employees func(childComplexity int) int Title func(childComplexity int) int } Mutation struct { MultipleUpload func(childComplexity int, files []*graphql.Upload) int SingleUpload func(childComplexity int, file graphql.Upload) int UpdateEmployeeTag func(childComplexity int, id int, tag string) int } Operator struct { Departments func(childComplexity int) int Employees func(childComplexity int) int OperatorType func(childComplexity int) int Title func(childComplexity int) int } Query struct { Employee func(childComplexity int, id int) int EmployeeAsList func(childComplexity int, id int) int Employees func(childComplexity int) int FirstEmployee func(childComplexity int) int Products func(childComplexity int) int Teammates func(childComplexity int, team model.Department) int // contains filtered or unexported fields } SDK struct { Engineers func(childComplexity int) int Owner func(childComplexity int) int Unicode func(childComplexity int) int Upc func(childComplexity int) int } Subscription struct { CountEmp func(childComplexity int, max int, intervalMilliseconds int) int CountEmp2 func(childComplexity int, max int, intervalMilliseconds int) int CountFor func(childComplexity int, count int) int CurrentTime func(childComplexity int) int } Time struct { TimeStamp func(childComplexity int) int UnixTime func(childComplexity int) int } // 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 EmployeeResolver ¶
type EngineerResolver ¶
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) FindSDKByUpc(ctx context.Context, upc string) (*model.Sdk, error) }
type ErrorWrapperResolver ¶
type MarketerResolver ¶
type MutationResolver ¶
type OperatorResolver ¶
type QueryResolver ¶
type QueryResolver interface { Employee(ctx context.Context, id int) (*model.Employee, error) EmployeeAsList(ctx context.Context, id int) ([]*model.Employee, error) Employees(ctx context.Context) ([]*model.Employee, error) Products(ctx context.Context) ([]model.Products, error) Teammates(ctx context.Context, team model.Department) ([]*model.Employee, error) FirstEmployee(ctx context.Context) (*model.Employee, error) }
type ResolverRoot ¶
type ResolverRoot interface { Employee() EmployeeResolver Engineer() EngineerResolver Entity() EntityResolver ErrorWrapper() ErrorWrapperResolver Marketer() MarketerResolver Mutation() MutationResolver Operator() OperatorResolver Query() QueryResolver Subscription() SubscriptionResolver }
type SubscriptionResolver ¶
type SubscriptionResolver interface { CurrentTime(ctx context.Context) (<-chan *model.Time, error) CountEmp(ctx context.Context, max int, intervalMilliseconds int) (<-chan int, error) CountEmp2(ctx context.Context, max int, intervalMilliseconds int) (<-chan int, error) CountFor(ctx context.Context, count int) (<-chan int, error) }
Click to show internal directories.
Click to hide internal directories.