generated

package
v1.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 13 Imported by: 0

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 {
	Mutation struct {
		CreateProfession     func(childComplexity int, input model.ProfessionInput) int
		CreateQualification  func(childComplexity int, input model.QualificationInput) int
		CreateQuestion       func(childComplexity int, input model.QuestionInput) int
		CreateUser           func(childComplexity int, input model.UserInput) int
		DeleteProfessions    func(childComplexity int, ids []int) int
		DeleteQualifications func(childComplexity int, ids []int) int
		DeleteQuestions      func(childComplexity int, ids []int) int
		DeleteUsers          func(childComplexity int, ids []int) int
		SignIn               func(childComplexity int, email string, password string, staySignedIn *bool) int
		UpdateManyUsers      func(childComplexity int, ids []int, input model.UserInput) int
		UpdateProfession     func(childComplexity int, id int, input model.ProfessionInput) int
		UpdateQualification  func(childComplexity int, id int, input model.QualificationInput) int
		UpdateQuestion       func(childComplexity int, id int, input model.QuestionInput) int
		UpdateUser           func(childComplexity int, id int, input model.UserInput) int
	}

	Profession struct {
		CreatedAt      func(childComplexity int) int
		Description    func(childComplexity int) int
		ID             func(childComplexity int) int
		Name           func(childComplexity int) int
		Qualifications func(childComplexity int) int
		Slug           func(childComplexity int) int
	}

	ProfessionList struct {
		Items func(childComplexity int) int
		Total func(childComplexity int) int
	}

	Qualification struct {
		Code        func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Description func(childComplexity int) int
		Formula     func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
		Slug        func(childComplexity int) int
	}

	QualificationList struct {
		Items func(childComplexity int) int
		Total func(childComplexity int) int
	}

	Query struct {
		GenerateTest          func(childComplexity int, qualificationIDs []int, limit *int) int
		Me                    func(childComplexity int) int
		Profession            func(childComplexity int, id *int, slug *string) int
		Professions           func(childComplexity int, filter *model.ProfessionFilter, limit *int, offset *int, sort []string) int
		Qualification         func(childComplexity int, id *int, slug *string) int
		Qualifications        func(childComplexity int, filter *model.QualificationFilter, limit *int, offset *int, sort []string) int
		Questions             func(childComplexity int, filter *model.QuestionFilter, limit *int, offset *int, sort []string) int
		SimilarQualifications func(childComplexity int, qualificationID int, limit *int, offset *int, sort []string) int
		User                  func(childComplexity int, id int) int
		Users                 func(childComplexity int, filter *model.UserFilter, limit *int, offset *int, sort []string) int
	}

	Question struct {
		AnswerA       func(childComplexity int) int
		AnswerAImage  func(childComplexity int) int
		AnswerB       func(childComplexity int) int
		AnswerBImage  func(childComplexity int) int
		AnswerC       func(childComplexity int) int
		AnswerCImage  func(childComplexity int) int
		AnswerD       func(childComplexity int) int
		AnswerDImage  func(childComplexity int) int
		Content       func(childComplexity int) int
		CorrectAnswer func(childComplexity int) int
		CreatedAt     func(childComplexity int) int
		Explanation   func(childComplexity int) int
		From          func(childComplexity int) int
		ID            func(childComplexity int) int
		Image         func(childComplexity int) int
		Qualification func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
	}

	QuestionList struct {
		Items func(childComplexity int) int
		Total func(childComplexity int) int
	}

	User struct {
		Activated   func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		DisplayName func(childComplexity int) int
		Email       func(childComplexity int) int
		ID          func(childComplexity int) int
		Role        func(childComplexity int) int
	}

	UserList struct {
		Items func(childComplexity int) int
		Total func(childComplexity int) int
	}

	UserWithToken struct {
		Token func(childComplexity int) int
		User  func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
	Authenticated func(ctx context.Context, obj interface{}, next graphql.Resolver, yes bool) (res interface{}, err error)
	HasRole       func(ctx context.Context, obj interface{}, next graphql.Resolver, role model.Role) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	CreateProfession(ctx context.Context, input model.ProfessionInput) (*model.Profession, error)
	UpdateProfession(ctx context.Context, id int, input model.ProfessionInput) (*model.Profession, error)
	DeleteProfessions(ctx context.Context, ids []int) ([]*model.Profession, error)
	CreateQualification(ctx context.Context, input model.QualificationInput) (*model.Qualification, error)
	UpdateQualification(ctx context.Context, id int, input model.QualificationInput) (*model.Qualification, error)
	DeleteQualifications(ctx context.Context, ids []int) ([]*model.Qualification, error)
	CreateQuestion(ctx context.Context, input model.QuestionInput) (*model.Question, error)
	UpdateQuestion(ctx context.Context, id int, input model.QuestionInput) (*model.Question, error)
	DeleteQuestions(ctx context.Context, ids []int) ([]*model.Question, error)
	CreateUser(ctx context.Context, input model.UserInput) (*model.User, error)
	UpdateUser(ctx context.Context, id int, input model.UserInput) (*model.User, error)
	UpdateManyUsers(ctx context.Context, ids []int, input model.UserInput) ([]*model.User, error)
	DeleteUsers(ctx context.Context, ids []int) ([]*model.User, error)
	SignIn(ctx context.Context, email string, password string, staySignedIn *bool) (*UserWithToken, error)
}

type ProfessionList

type ProfessionList struct {
	Total int                 `json:"total"`
	Items []*model.Profession `json:"items"`
}

type ProfessionResolver

type ProfessionResolver interface {
	Qualifications(ctx context.Context, obj *model.Profession) ([]*model.Qualification, error)
}

type QualificationList

type QualificationList struct {
	Total int                    `json:"total"`
	Items []*model.Qualification `json:"items"`
}

type QueryResolver

type QueryResolver interface {
	Professions(ctx context.Context, filter *model.ProfessionFilter, limit *int, offset *int, sort []string) (*ProfessionList, error)
	Profession(ctx context.Context, id *int, slug *string) (*model.Profession, error)
	Qualifications(ctx context.Context, filter *model.QualificationFilter, limit *int, offset *int, sort []string) (*QualificationList, error)
	SimilarQualifications(ctx context.Context, qualificationID int, limit *int, offset *int, sort []string) (*QualificationList, error)
	Qualification(ctx context.Context, id *int, slug *string) (*model.Qualification, error)
	Questions(ctx context.Context, filter *model.QuestionFilter, limit *int, offset *int, sort []string) (*QuestionList, error)
	GenerateTest(ctx context.Context, qualificationIDs []int, limit *int) ([]*model.Question, error)
	Users(ctx context.Context, filter *model.UserFilter, limit *int, offset *int, sort []string) (*UserList, error)
	User(ctx context.Context, id int) (*model.User, error)
	Me(ctx context.Context) (*model.User, error)
}

type QuestionList

type QuestionList struct {
	Total int               `json:"total"`
	Items []*model.Question `json:"items"`
}

type QuestionResolver

type QuestionResolver interface {
	Qualification(ctx context.Context, obj *model.Question) (*model.Qualification, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Profession() ProfessionResolver
	Query() QueryResolver
	Question() QuestionResolver
}

type UserList

type UserList struct {
	Total int           `json:"total"`
	Items []*model.User `json:"items"`
}

type UserWithToken

type UserWithToken struct {
	Token string      `json:"token"`
	User  *model.User `json:"user"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL