Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type CreateReviewInputResolver
- type DirectiveRoot
- type DishResolver
- type ImageResolver
- type MutationResolver
- type OccurrenceResolver
- type OccurrenceSideDishResolver
- type OccurrenceTagResolver
- type QueryResolver
- type ResolverRoot
- type ReviewDataDishResolver
- type ReviewDataOccurrenceResolver
- type ReviewMetadataDishResolver
- type ReviewMetadataOccurrenceResolver
- type ReviewResolver
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 { Dish struct { Aliases func(childComplexity int) int ID func(childComplexity int) int NameDe func(childComplexity int) int NameEn func(childComplexity int) int ReviewData func(childComplexity int, filter *models.ReviewFilter) int } DishAlias struct { AliasName func(childComplexity int) int Dish func(childComplexity int) int NormalizedAliasName func(childComplexity int) int } Image struct { ID func(childComplexity int) int ImageURL func(childComplexity int) int Review func(childComplexity int) int } Location struct { ExternalID func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int } Mutation struct { AddSideDishToOccurrence func(childComplexity int, input sqlc.AddOccurrenceSideDishParams) int AddTagToOccurrence func(childComplexity int, input sqlc.AddOccurrenceTagParams) int CreateDish func(childComplexity int, input sqlc.CreateDishParams) int CreateDishAlias func(childComplexity int, input sqlc.CreateDishAliasParams) int CreateOccurrence func(childComplexity int, input models.CreateOccurrenceInputHelper) int CreateReview func(childComplexity int, input db.CreateReviewWithImagesParams) int CreateTag func(childComplexity int, input sqlc.CreateTagParams) int DeleteDishAlias func(childComplexity int, input models.DeleteDishAliasInput) int DeleteOccurrence func(childComplexity int, input models.DeleteOccurrenceInput) int DeleteReview func(childComplexity int, input models.DeleteReviewInput) int LoginUser func(childComplexity int, input models.LoginUserInput) int RemoveSideDishFromOccurrence func(childComplexity int, input sqlc.RemoveOccurrenceSideDishParams) int RemoveTagFromOccurrence func(childComplexity int, input sqlc.RemoveOccurrenceTagParams) int UpdateDish func(childComplexity int, input sqlc.UpdateDishParams) int UpdateDishAlias func(childComplexity int, input sqlc.UpdateDishAliasParams) int UpdateOccurrence func(childComplexity int, input sqlc.UpdateOccurrenceParams) int UpdateReview func(childComplexity int, input sqlc.UpdateReviewParams) int } Occurrence struct { Carbohydrates func(childComplexity int) int Date func(childComplexity int) int Dish func(childComplexity int) int Fat func(childComplexity int) int Fiber func(childComplexity int) int ID func(childComplexity int) int Kcal func(childComplexity int) int Kj func(childComplexity int) int Location func(childComplexity int) int PriceGuest func(childComplexity int) int PriceStaff func(childComplexity int) int PriceStudent func(childComplexity int) int Protein func(childComplexity int) int ReviewData func(childComplexity int, filter *models.ReviewFilter) int Salt func(childComplexity int) int SaturatedFat func(childComplexity int) int SideDishes func(childComplexity int) int Status func(childComplexity int) int Sugar func(childComplexity int) int Tags func(childComplexity int) int } OccurrenceSideDish struct { Dish func(childComplexity int) int Occurrence func(childComplexity int) int } OccurrenceTag struct { Occurrence func(childComplexity int) int Tag func(childComplexity int) int } Query struct { CurrentUser func(childComplexity int) int Dishes func(childComplexity int) int LocationByID func(childComplexity int, id uuid.UUID) int Locations func(childComplexity int) int Occurrences func(childComplexity int, filter *sqlc.GetFilteredOccurrencesParams) int Reviews func(childComplexity int, filter *models.ReviewFilter) int Tags func(childComplexity int) int VcsBuildInfo func(childComplexity int) int } Review struct { AcceptedAt func(childComplexity int) int CreatedAt func(childComplexity int) int DisplayName func(childComplexity int) int ID func(childComplexity int) int Images func(childComplexity int) int Occurrence func(childComplexity int) int Stars func(childComplexity int) int Text func(childComplexity int) int UpdatedAt func(childComplexity int) int } ReviewDataDish struct { Images func(childComplexity int) int Metadata func(childComplexity int) int Reviews func(childComplexity int) int } ReviewDataOccurrence struct { Images func(childComplexity int) int Metadata func(childComplexity int) int Reviews func(childComplexity int) int } ReviewMetadataDish struct { AverageStars func(childComplexity int) int ReviewCount func(childComplexity int) int } ReviewMetadataOccurrence struct { AverageStars func(childComplexity int) int ReviewCount func(childComplexity int) int } Tag struct { Description func(childComplexity int) int IsAllergy func(childComplexity int) int Key func(childComplexity int) int Name func(childComplexity int) int Priority func(childComplexity int) int ShortName func(childComplexity int) int } User struct { Email func(childComplexity int) int ID func(childComplexity int) int } VcsBuildInfo struct { Commit func(childComplexity int) int CommitTime func(childComplexity int) int Modified func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type CreateReviewInputResolver ¶
type CreateReviewInputResolver interface {
Images(ctx context.Context, obj *db.CreateReviewWithImagesParams, data []*models.ImageInput) error
}
type DirectiveRoot ¶
type DishResolver ¶
type ImageResolver ¶
type MutationResolver ¶
type MutationResolver interface { LoginUser(ctx context.Context, input models.LoginUserInput) (string, error) CreateTag(ctx context.Context, input sqlc.CreateTagParams) (*sqlc.Tag, error) CreateDish(ctx context.Context, input sqlc.CreateDishParams) (*sqlc.Dish, error) UpdateDish(ctx context.Context, input sqlc.UpdateDishParams) (*sqlc.Dish, error) CreateDishAlias(ctx context.Context, input sqlc.CreateDishAliasParams) (*sqlc.DishAlias, error) UpdateDishAlias(ctx context.Context, input sqlc.UpdateDishAliasParams) (*sqlc.DishAlias, error) DeleteDishAlias(ctx context.Context, input models.DeleteDishAliasInput) (*sqlc.DishAlias, error) CreateOccurrence(ctx context.Context, input models.CreateOccurrenceInputHelper) (*sqlc.Occurrence, error) UpdateOccurrence(ctx context.Context, input sqlc.UpdateOccurrenceParams) (*sqlc.Occurrence, error) DeleteOccurrence(ctx context.Context, input models.DeleteOccurrenceInput) (*sqlc.Occurrence, error) AddTagToOccurrence(ctx context.Context, input sqlc.AddOccurrenceTagParams) (*sqlc.OccurrenceTag, error) RemoveTagFromOccurrence(ctx context.Context, input sqlc.RemoveOccurrenceTagParams) (*sqlc.OccurrenceTag, error) AddSideDishToOccurrence(ctx context.Context, input sqlc.AddOccurrenceSideDishParams) (*sqlc.OccurrenceSideDish, error) RemoveSideDishFromOccurrence(ctx context.Context, input sqlc.RemoveOccurrenceSideDishParams) (*sqlc.OccurrenceSideDish, error) CreateReview(ctx context.Context, input db.CreateReviewWithImagesParams) (*sqlc.Review, error) UpdateReview(ctx context.Context, input sqlc.UpdateReviewParams) (*sqlc.Review, error) DeleteReview(ctx context.Context, input models.DeleteReviewInput) (*sqlc.Review, error) }
type OccurrenceResolver ¶
type OccurrenceResolver interface { Location(ctx context.Context, obj *sqlc.Occurrence) (*sqlc.Location, error) Dish(ctx context.Context, obj *sqlc.Occurrence) (*sqlc.Dish, error) SideDishes(ctx context.Context, obj *sqlc.Occurrence) ([]*sqlc.Dish, error) Tags(ctx context.Context, obj *sqlc.Occurrence) ([]*sqlc.Tag, error) ReviewData(ctx context.Context, obj *sqlc.Occurrence, filter *models.ReviewFilter) (*models.ReviewDataOccurrence, error) }
type OccurrenceSideDishResolver ¶
type OccurrenceSideDishResolver interface { Occurrence(ctx context.Context, obj *sqlc.OccurrenceSideDish) (*sqlc.Occurrence, error) Dish(ctx context.Context, obj *sqlc.OccurrenceSideDish) (*sqlc.Dish, error) }
type OccurrenceTagResolver ¶
type OccurrenceTagResolver interface { Occurrence(ctx context.Context, obj *sqlc.OccurrenceTag) (*sqlc.Occurrence, error) Tag(ctx context.Context, obj *sqlc.OccurrenceTag) (*sqlc.Tag, error) }
type QueryResolver ¶
type QueryResolver interface { CurrentUser(ctx context.Context) (*sqlc.User, error) Tags(ctx context.Context) ([]*sqlc.Tag, error) Dishes(ctx context.Context) ([]*sqlc.Dish, error) Occurrences(ctx context.Context, filter *sqlc.GetFilteredOccurrencesParams) ([]*sqlc.Occurrence, error) Reviews(ctx context.Context, filter *models.ReviewFilter) ([]*sqlc.Review, error) Locations(ctx context.Context) ([]*sqlc.Location, error) LocationByID(ctx context.Context, id uuid.UUID) (*sqlc.Location, error) VcsBuildInfo(ctx context.Context) (*utils.VCSBuildInfo, error) }
type ResolverRoot ¶
type ResolverRoot interface { Dish() DishResolver Image() ImageResolver Mutation() MutationResolver Occurrence() OccurrenceResolver OccurrenceSideDish() OccurrenceSideDishResolver OccurrenceTag() OccurrenceTagResolver Query() QueryResolver Review() ReviewResolver ReviewDataDish() ReviewDataDishResolver ReviewDataOccurrence() ReviewDataOccurrenceResolver ReviewMetadataDish() ReviewMetadataDishResolver ReviewMetadataOccurrence() ReviewMetadataOccurrenceResolver CreateReviewInput() CreateReviewInputResolver }
type ReviewDataDishResolver ¶
type ReviewDataOccurrenceResolver ¶
type ReviewDataOccurrenceResolver interface { Reviews(ctx context.Context, obj *models.ReviewDataOccurrence) ([]*sqlc.Review, error) Images(ctx context.Context, obj *models.ReviewDataOccurrence) ([]*sqlc.Image, error) Metadata(ctx context.Context, obj *models.ReviewDataOccurrence) (*sqlc.GetOccurrenceReviewMetadataRow, error) }
Click to show internal directories.
Click to hide internal directories.