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 { AcademicField struct { Name func(childComplexity int) int } Chapter struct { ID func(childComplexity int) int StartAt func(childComplexity int) int ThumbnailLink func(childComplexity int) int Topic func(childComplexity int) int } Query struct { AcademicFields func(childComplexity int) int RandomSubjects func(childComplexity int, category string, series string, academicField string, numSubjects int) int Subject func(childComplexity int, id string) int Subjects func(childComplexity int, title string, faculty string, academicField string) int SubjectsWithSpecifiedVideos func(childComplexity int, title string, faculty string) int } RelatedSubject struct { AcademicField func(childComplexity int) int Category func(childComplexity int) int Department func(childComplexity int) int Faculty func(childComplexity int) int FirstHeldOn func(childComplexity int) int FreeDescription func(childComplexity int) int ID func(childComplexity int) int Language func(childComplexity int) int Location func(childComplexity int) int RelatedSubjectIds func(childComplexity int) int ResourceIds func(childComplexity int) int Series func(childComplexity int) int SyllabusId func(childComplexity int) int ThumbnailLink func(childComplexity int) int Title func(childComplexity int) int VideoIds func(childComplexity int) int } Resource struct { Description func(childComplexity int) int ID func(childComplexity int) int Link func(childComplexity int) int Ordering func(childComplexity int) int Title func(childComplexity int) int } Subject struct { AcademicField func(childComplexity int) int Category func(childComplexity int) int Department func(childComplexity int) int Faculty func(childComplexity int) int FirstHeldOn func(childComplexity int) int FreeDescription func(childComplexity int) int ID func(childComplexity int) int Language func(childComplexity int) int Location func(childComplexity int) int RelatedSubjects func(childComplexity int) int Resources func(childComplexity int) int Series func(childComplexity int) int Syllabus func(childComplexity int) int ThumbnailLink func(childComplexity int) int Title func(childComplexity int) int Videos func(childComplexity int) int } SubjectWithSpecifiedVideos struct { Subject func(childComplexity int) int Videos func(childComplexity int) int } Subpage struct { Content func(childComplexity int) int ID func(childComplexity int) int } Syllabus struct { AcademicYear func(childComplexity int) int AssignedGrade func(childComplexity int) int CourseDayPeriod func(childComplexity int) int CourseFormat func(childComplexity int) int CourseRequirement func(childComplexity int) int Faculty func(childComplexity int) int GradingMethod func(childComplexity int) int ID func(childComplexity int) int Language func(childComplexity int) int LessonPlan func(childComplexity int) int NumCredit func(childComplexity int) int Objective func(childComplexity int) int OutClassLearning func(childComplexity int) int Outline func(childComplexity int) int Reference func(childComplexity int) int Remark func(childComplexity int) int Semester func(childComplexity int) int SubjectNumbering func(childComplexity int) int Subpages func(childComplexity int) int TargetedAudience func(childComplexity int) int } Translation struct { ID func(childComplexity int) int LanguageCode func(childComplexity int) int Translation func(childComplexity int) int } Video struct { Chapters func(childComplexity int) int Faculty func(childComplexity int) int ID func(childComplexity int) int Language func(childComplexity int) int LecturedOn func(childComplexity int) int Link func(childComplexity int) int Ordering func(childComplexity int) int Title func(childComplexity int) int Transcription func(childComplexity int) int Translations func(childComplexity int) int VideoLength func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type QueryResolver ¶
type QueryResolver interface { Subject(ctx context.Context, id string) (*model.Subject, error) Subjects(ctx context.Context, title string, faculty string, academicField string) ([]*model.Subject, error) AcademicFields(ctx context.Context) ([]*model.AcademicField, error) RandomSubjects(ctx context.Context, category string, series string, academicField string, numSubjects int) ([]*model.Subject, error) SubjectsWithSpecifiedVideos(ctx context.Context, title string, faculty string) ([]*model.SubjectWithSpecifiedVideos, error) }
type ResolverRoot ¶
type ResolverRoot interface { Query() QueryResolver Subject() SubjectResolver }
type SubjectResolver ¶
type SubjectResolver interface { Videos(ctx context.Context, obj *model.Subject) ([]*model.Video, error) Resources(ctx context.Context, obj *model.Subject) ([]*model.Resource, error) RelatedSubjects(ctx context.Context, obj *model.Subject) ([]*model.RelatedSubject, error) Syllabus(ctx context.Context, obj *model.Subject) (*model.Syllabus, error) }
Click to show internal directories.
Click to hide internal directories.