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 { Course struct { Description func(childComplexity int) int ID func(childComplexity int) int Lessons func(childComplexity int) int Name func(childComplexity int) int Price func(childComplexity int) int Psychologists func(childComplexity int) int } Lesson struct { Course func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Number func(childComplexity int) int } Mutation struct { CreateCourse func(childComplexity int, input model.NewCourse) int CreateLesson func(childComplexity int, input model.NewLesson) int CreatePsychologist func(childComplexity int, input model.NewPsychologist) int UpdateCourse func(childComplexity int, input model.UpdateCourse) int UpdateLesson func(childComplexity int, input model.UpdateLesson) int UpdatePsychologist func(childComplexity int, input model.UpdatePsychologist) int } Psychologist struct { Courses func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int } Query struct { Course func(childComplexity int, id string) int Courses func(childComplexity int) int Lesson func(childComplexity int, id string) int Lessons func(childComplexity int) int Psychologist func(childComplexity int, id string) int Psychologists func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type CourseResolver ¶
type DirectiveRoot ¶
type DirectiveRoot struct { }
type LessonResolver ¶
type MutationResolver ¶
type MutationResolver interface { CreatePsychologist(ctx context.Context, input model.NewPsychologist) (*bunmodels.Psychologist, error) UpdatePsychologist(ctx context.Context, input model.UpdatePsychologist) (*bunmodels.Psychologist, error) CreateCourse(ctx context.Context, input model.NewCourse) (*bunmodels.Course, error) UpdateCourse(ctx context.Context, input model.UpdateCourse) (*bunmodels.Course, error) CreateLesson(ctx context.Context, input model.NewLesson) (*bunmodels.Lesson, error) UpdateLesson(ctx context.Context, input model.UpdateLesson) (*bunmodels.Lesson, error) }
type PsychologistResolver ¶
type QueryResolver ¶
type QueryResolver interface { Psychologist(ctx context.Context, id string) (*bunmodels.Psychologist, error) Psychologists(ctx context.Context) ([]*bunmodels.Psychologist, error) Course(ctx context.Context, id string) (*bunmodels.Course, error) Courses(ctx context.Context) ([]*bunmodels.Course, error) Lesson(ctx context.Context, id string) (*bunmodels.Lesson, error) Lessons(ctx context.Context) ([]*bunmodels.Lesson, error) }
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(em *entman.EntityManager) *Resolver
func (*Resolver) Course ¶
func (r *Resolver) Course() CourseResolver
func (*Resolver) Lesson ¶
func (r *Resolver) Lesson() LessonResolver
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Psychologist ¶
func (r *Resolver) Psychologist() PsychologistResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
type ResolverRoot ¶
type ResolverRoot interface { Course() CourseResolver Lesson() LessonResolver Mutation() MutationResolver Psychologist() PsychologistResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.