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 { LikesUpdate struct { Added func(childComplexity int) int Removed func(childComplexity int) int } Mutation struct { CreateRule func(childComplexity int, summary string, detail *string) int CreateUser func(childComplexity int, name string, email string, password string) int DeleteRule func(childComplexity int, id int) int Like func(childComplexity int, add []int, remove []int) int Login func(childComplexity int, email string, password string) int UpdateUser func(childComplexity int, name *string) 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 { Rules func(childComplexity int, limit int, after int, userID *int) int Users func(childComplexity int, limit int, after int, name *string) int } Rule struct { Created func(childComplexity int) int Detail func(childComplexity int) int ID func(childComplexity int) int Likes func(childComplexity int, limit int, after int) int Summary func(childComplexity int) int User func(childComplexity int) int } RulePage struct { PageInfo func(childComplexity int) int Rules func(childComplexity int) int } User struct { ID func(childComplexity int) int Likes func(childComplexity int, limit int, after int) int Name func(childComplexity int) int Rules func(childComplexity int, limit int, after int) int } UserPage struct { PageInfo func(childComplexity int) int Users func(childComplexity int) int } UserToken struct { ExpiresAt func(childComplexity int) int Token func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { CreateUser(ctx context.Context, name string, email string, password string) (*model.User, error) UpdateUser(ctx context.Context, name *string) (*model.User, error) Login(ctx context.Context, email string, password string) (*model.UserToken, error) CreateRule(ctx context.Context, summary string, detail *string) (*model.Rule, error) DeleteRule(ctx context.Context, id int) (*int, error) Like(ctx context.Context, add []int, remove []int) (*model.LikesUpdate, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Rule() RuleResolver User() UserResolver }
type RuleResolver ¶
Click to show internal directories.
Click to hide internal directories.