generated

package
v0.0.0-...-2992433 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 11 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 {
	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 QueryResolver interface {
	Me(ctx context.Context) (*model.User, error)
	User(ctx context.Context, id string) (*model.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
	User() UserResolver
}

type UserResolver

type UserResolver interface {
	ExerciseRecords(ctx context.Context, obj *model.User, startTime *string, endTime *string) ([]*model.ExerciseRecord, error)
	FoodRecords(ctx context.Context, obj *model.User, startTime *string, endTime *string) ([]*model.FoodRecord, error)
}

Jump to

Keyboard shortcuts

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