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 { Game struct { BggID func(childComplexity int) int CreatedAt func(childComplexity int) int Description func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Plays func(childComplexity int) int Price func(childComplexity int) int UpdatedAt func(childComplexity int) int } Mutation struct { CreateGame func(childComplexity int, input customTypes.CreateGame) int CreatePlay func(childComplexity int, input customTypes.CreatePlay) int CreatePlayer func(childComplexity int, input customTypes.CreatePlayer) int CreatePlayerPlay func(childComplexity int, input customTypes.CreatePlayerPlay) int CreateSession func(childComplexity int, input customTypes.CreateSession) int DeleteGame func(childComplexity int, id string) int DeletePlay func(childComplexity int, id string) int DeletePlayer func(childComplexity int, id string) int DeletePlayerPlay func(childComplexity int, input customTypes.GetPlayerPlay) int DeleteSession func(childComplexity int, id string) int UpdateGame func(childComplexity int, input customTypes.UpdateGame) int UpdatePlayer func(childComplexity int, input customTypes.UpdatePlayer) int UpdatePlayerPlay func(childComplexity int, input customTypes.UpdatePlayerPlay) int UpdateSession func(childComplexity int, input customTypes.UpdateSession) int } Play struct { CreatedAt func(childComplexity int) int Game func(childComplexity int) int ID func(childComplexity int) int Players func(childComplexity int) int Sessions func(childComplexity int) int UpdatedAt func(childComplexity int) int } Player struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Plays func(childComplexity int) int UpdatedAt func(childComplexity int) int } PlayerPlay struct { CreatedAt func(childComplexity int) int Play func(childComplexity int) int Player func(childComplexity int) int Score func(childComplexity int) int UpdatedAt func(childComplexity int) int } Query struct { GetGame func(childComplexity int, id string) int GetGames func(childComplexity int) int GetPlay func(childComplexity int, id string) int GetPlayer func(childComplexity int, id string) int GetPlayerPlay func(childComplexity int, input customTypes.GetPlayerPlay) int GetPlayerPlays func(childComplexity int) int GetPlayers func(childComplexity int) int GetPlays func(childComplexity int) int GetSession func(childComplexity int, id string) int GetSessions func(childComplexity int) int } Session struct { CreatedAt func(childComplexity int) int FinishedAt func(childComplexity int) int GameBelongsTo func(childComplexity int) int ID func(childComplexity int) int Play func(childComplexity int) int StartedAt 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 { CreateGame(ctx context.Context, input customTypes.CreateGame) (*customTypes.Game, error) UpdateGame(ctx context.Context, input customTypes.UpdateGame) (*customTypes.Game, error) DeleteGame(ctx context.Context, id string) (*customTypes.Game, error) CreatePlay(ctx context.Context, input customTypes.CreatePlay) (*customTypes.Play, error) DeletePlay(ctx context.Context, id string) (*customTypes.Play, error) CreatePlayer(ctx context.Context, input customTypes.CreatePlayer) (*customTypes.Player, error) UpdatePlayer(ctx context.Context, input customTypes.UpdatePlayer) (*customTypes.Player, error) DeletePlayer(ctx context.Context, id string) (*customTypes.Player, error) CreatePlayerPlay(ctx context.Context, input customTypes.CreatePlayerPlay) (*customTypes.PlayerPlay, error) UpdatePlayerPlay(ctx context.Context, input customTypes.UpdatePlayerPlay) (*customTypes.PlayerPlay, error) DeletePlayerPlay(ctx context.Context, input customTypes.GetPlayerPlay) (*customTypes.PlayerPlay, error) CreateSession(ctx context.Context, input customTypes.CreateSession) (*customTypes.Session, error) UpdateSession(ctx context.Context, input customTypes.UpdateSession) (*customTypes.Session, error) DeleteSession(ctx context.Context, id string) (*customTypes.Session, error) }
type PlayerPlayResolver ¶
type PlayerPlayResolver interface { Player(ctx context.Context, obj *customTypes.PlayerPlay) (*customTypes.Player, error) Play(ctx context.Context, obj *customTypes.PlayerPlay) (*customTypes.Play, error) }
type QueryResolver ¶
type QueryResolver interface { GetGames(ctx context.Context) ([]*customTypes.Game, error) GetGame(ctx context.Context, id string) (*customTypes.Game, error) GetPlays(ctx context.Context) ([]*customTypes.Play, error) GetPlay(ctx context.Context, id string) (*customTypes.Play, error) GetPlayers(ctx context.Context) ([]*customTypes.Player, error) GetPlayer(ctx context.Context, id string) (*customTypes.Player, error) GetPlayerPlays(ctx context.Context) ([]*customTypes.PlayerPlay, error) GetPlayerPlay(ctx context.Context, input customTypes.GetPlayerPlay) (*customTypes.PlayerPlay, error) GetSessions(ctx context.Context) ([]*customTypes.Session, error) GetSession(ctx context.Context, id string) (*customTypes.Session, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver PlayerPlay() PlayerPlayResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.