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 { CalorieGoal struct { Calories func(childComplexity int) int } ExerciseRecord struct { Calories func(childComplexity int) int Label func(childComplexity int) int Timestamp func(childComplexity int) int User func(childComplexity int) int } FoodRecord struct { Calories func(childComplexity int) int Label func(childComplexity int) int Timestamp func(childComplexity int) int User func(childComplexity int) int } Mutation struct { CreateExerciseRecord func(childComplexity int, input model.NewExerciseRecord) int CreateFoodRecord func(childComplexity int, input model.NewFoodRecord) int CreateMe func(childComplexity int) int CreateUser func(childComplexity int, input model.NewUser) int DeleteUser func(childComplexity int, id string) int SetCalorieGoal func(childComplexity int, input model.CalorieGoalInput) int } Query struct { Me func(childComplexity int) int User func(childComplexity int, id string) int } User struct { Age func(childComplexity int) int CalorieGoal func(childComplexity int) int DisplayName func(childComplexity int) int ExerciseRecords func(childComplexity int, startTime *string, endTime *string) int FoodRecords func(childComplexity int, startTime *string, endTime *string) int Height func(childComplexity int) int ID func(childComplexity int) int Sex func(childComplexity int) int Weight 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 { CreateMe(ctx context.Context) (*model.User, error) CreateUser(ctx context.Context, input model.NewUser) (*model.User, error) CreateExerciseRecord(ctx context.Context, input model.NewExerciseRecord) (*model.ExerciseRecord, error) CreateFoodRecord(ctx context.Context, input model.NewFoodRecord) (*model.FoodRecord, error) SetCalorieGoal(ctx context.Context, input model.CalorieGoalInput) (*model.CalorieGoal, error) DeleteUser(ctx context.Context, id string) (*bool, error) }
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.