generated

package
v0.0.0-...-2b2b3c0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: GPL-3.0 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 {
	Game struct {
		Board func(childComplexity int) int
		ID    func(childComplexity int) int
	}

	GamesConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	GamesEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Mutation struct {
		CreateGame   func(childComplexity int, board []string) int
		CreatePlayer func(childComplexity int, name string) int
		CreateWord   func(childComplexity int, gameID string, path []model.Point) int
	}

	PageInfo struct {
		EndCursor   func(childComplexity int) int
		HasNextPage func(childComplexity int) int
		StartCursor func(childComplexity int) int
	}

	Player struct {
		ID    func(childComplexity int) int
		Name  func(childComplexity int) int
		Words func(childComplexity int) int
	}

	PlayersConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	PlayersEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Query struct {
		Game    func(childComplexity int, id string) int
		Games   func(childComplexity int, first *int, after *string) int
		Player  func(childComplexity int, id string) int
		Players func(childComplexity int, first *int, after *string) int
		Words   func(childComplexity int, gameID *string, playerID *string, first *int, after *string) int
	}

	Word struct {
		Game    func(childComplexity int) int
		ID      func(childComplexity int) int
		Path    func(childComplexity int) int
		Players func(childComplexity int) int
	}

	WordsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	WordsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type GameResolver

type GameResolver interface {
	Board(ctx context.Context, obj *model.Game) ([]string, error)
}

type MutationResolver

type MutationResolver interface {
	CreatePlayer(ctx context.Context, name string) (*model.Player, error)
	CreateGame(ctx context.Context, board []string) (*model.Game, error)
	CreateWord(ctx context.Context, gameID string, path []model.Point) (*model.Word, error)
}

type PlayerResolver

type PlayerResolver interface {
	Words(ctx context.Context, obj *model.Player) ([]*model.Word, error)
}

type QueryResolver

type QueryResolver interface {
	Player(ctx context.Context, id string) (*model.Player, error)
	Players(ctx context.Context, first *int, after *string) (*model.PlayersConnection, error)
	Game(ctx context.Context, id string) (*model.Game, error)
	Games(ctx context.Context, first *int, after *string) (*model.GamesConnection, error)
	Words(ctx context.Context, gameID *string, playerID *string, first *int, after *string) (*model.WordsConnection, error)
}

type ResolverRoot

type ResolverRoot interface {
	Game() GameResolver
	Mutation() MutationResolver
	Player() PlayerResolver
	Query() QueryResolver
	Word() WordResolver
}

type WordResolver

type WordResolver interface {
	Game(ctx context.Context, obj *model.Word) (*model.Game, error)

	Players(ctx context.Context, obj *model.Word) ([]*model.Player, error)
}

Jump to

Keyboard shortcuts

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