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 { Department struct { ID func(childComplexity int) int Manager func(childComplexity int) int Name func(childComplexity int) int } DepartmentConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } DepartmentEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Job struct { Department func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int } JobConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } JobEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Mutation struct { CreateApplicant func(childComplexity int, user model.UserInput) int CreateDepartment func(childComplexity int, department model.DepartmentInput) int CreateJob func(childComplexity int, job *model.JobInput) int RemoveApplicant func(childComplexity int, id int) int RemoveDepartment func(childComplexity int, id int) int UpdateDepartmentManager func(childComplexity int, department *int, manager *int) int UpdateJobDepartment func(childComplexity int, job *int, department *int) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Query struct { Departments func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.DepartmentOrder) int Jobs func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.JobOrder) int Node func(childComplexity int, id int) int Nodes func(childComplexity int, ids []int) int Users func(childComplexity int, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.UserOrder) int } User struct { Email func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Password func(childComplexity int) int Role func(childComplexity int) int } UserConnection struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } UserEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type MutationResolver ¶
type MutationResolver interface { CreateApplicant(ctx context.Context, user model.UserInput) (*ent.User, error) RemoveApplicant(ctx context.Context, id int) (*ent.User, error) CreateDepartment(ctx context.Context, department model.DepartmentInput) (*ent.Department, error) RemoveDepartment(ctx context.Context, id int) (*ent.Department, error) CreateJob(ctx context.Context, job *model.JobInput) (*ent.Job, error) UpdateDepartmentManager(ctx context.Context, department *int, manager *int) (*ent.Department, error) UpdateJobDepartment(ctx context.Context, job *int, department *int) (*ent.Job, error) }
type QueryResolver ¶
type QueryResolver interface { Node(ctx context.Context, id int) (ent.Noder, error) Nodes(ctx context.Context, ids []int) ([]ent.Noder, error) Users(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.UserOrder) (*ent.UserConnection, error) Departments(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.DepartmentOrder) (*ent.DepartmentConnection, error) Jobs(ctx context.Context, after *ent.Cursor, first *int, before *ent.Cursor, last *int, orderBy *ent.JobOrder) (*ent.JobConnection, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.