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 { CreateProduct func(childComplexity int, input *models.NewProduct) int CreateReview func(childComplexity int, input *models.NewReview) int CreateUser func(childComplexity int, input models.NewUser) int UpdateUserProfile func(childComplexity int, input models.UpdatedProfile) int } Product struct { CreatedAt func(childComplexity int) int CreatedByAdmin func(childComplexity int) int Description func(childComplexity int) int EndDate func(childComplexity int) int Name func(childComplexity int) int Price func(childComplexity int) int Rating func(childComplexity int) int ReviewCount func(childComplexity int) int ShortDescription func(childComplexity int) int Sku func(childComplexity int) int StartDate func(childComplexity int) int Stock func(childComplexity int) int UpdatedAt func(childComplexity int) int } Query struct { LoadActiveProducts func(childComplexity int, limit *int, offset *int) int LoadReviewForUserWithProductSku func(childComplexity int, productSku string) int LoadReviewsForProduct func(childComplexity int, productSku string, limit *int, offset *int) int LoadTotalNumberOfReviewsForProduct func(childComplexity int, productSku string) int UserProfile func(childComplexity int, email *string) int Users func(childComplexity int, limit *int, offset *int) int } Review struct { Anonymous func(childComplexity int) int CreatedAt func(childComplexity int) int ProductSku func(childComplexity int) int Rating func(childComplexity int) int TextReview func(childComplexity int) int UserDisplayName func(childComplexity int) int } User struct { CreatedAt func(childComplexity int) int Email func(childComplexity int) int Role func(childComplexity int) int UpdatedAt func(childComplexity int) int UserProfile func(childComplexity int) int } UserProfile struct { CreatedAt func(childComplexity int) int Email func(childComplexity int) int FirstName func(childComplexity int) int LastName func(childComplexity int) int UpdatedAt 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, input models.NewUser) (string, error) UpdateUserProfile(ctx context.Context, input models.UpdatedProfile) (*models.UserProfile, error) CreateProduct(ctx context.Context, input *models.NewProduct) (*models.Product, error) CreateReview(ctx context.Context, input *models.NewReview) (*models.Review, error) }
type QueryResolver ¶
type QueryResolver interface { Users(ctx context.Context, limit *int, offset *int) ([]*models.User, error) UserProfile(ctx context.Context, email *string) (*models.User, error) LoadActiveProducts(ctx context.Context, limit *int, offset *int) ([]*models.Product, error) LoadTotalNumberOfReviewsForProduct(ctx context.Context, productSku string) (int, error) LoadReviewsForProduct(ctx context.Context, productSku string, limit *int, offset *int) ([]*models.Review, error) LoadReviewForUserWithProductSku(ctx context.Context, productSku string) (*models.Review, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.