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 { Constellation struct { CreatedAt func(childComplexity int) int Galaxies func(childComplexity int, after *string, before *string, first *int, last *int) int ID func(childComplexity int) int Name func(childComplexity int) int UpdatedAt func(childComplexity int) int } ConstellationConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } ConstellationEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } CreateConstellationPayload struct { Constellation func(childComplexity int) int } CreateConstellationsPayload struct { Constellations func(childComplexity int) int } Galaxy struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Planets func(childComplexity int, after *string, before *string, first *int, last *int) int Stars func(childComplexity int, after *string, before *string, first *int, last *int) int UpdatedAt func(childComplexity int) int } GalaxyConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } GalaxyEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Mutation struct { CreateConstellation func(childComplexity int, input model.CreateConstellationInput) int CreateConstellations func(childComplexity int, input []*model.CreateConstellationInput) int CreateTodo func(childComplexity int, input model.NewTodo) int } PageInfo struct { EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int } Planet struct { CreatedAt func(childComplexity int) int Description func(childComplexity int) int Galaxy func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int PlanetType func(childComplexity int) int UpdatedAt func(childComplexity int) int } PlanetConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } PlanetEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Query struct { Constellations func(childComplexity int, after *string, before *string, first *int, last *int) int Galaxies func(childComplexity int, after *string, before *string, first *int, last *int) int Node func(childComplexity int, id string) int Planets func(childComplexity int, after *string, before *string, first *int, last *int, planetType *model.PlanetTypeEnum) int Stars func(childComplexity int, after *string, before *string, first *int, last *int) int Todos func(childComplexity int) int } Star struct { Class func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int UpdatedAt func(childComplexity int) int } StarConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } StarEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int } Subscription struct { Constellations func(childComplexity int) int } Todo struct { Done func(childComplexity int) int ID func(childComplexity int) int Text func(childComplexity int) int User func(childComplexity int) int } User struct { ID func(childComplexity int) int Name 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 { CreateTodo(ctx context.Context, input model.NewTodo) (*model.Todo, error) CreateConstellation(ctx context.Context, input model.CreateConstellationInput) (*model.CreateConstellationPayload, error) CreateConstellations(ctx context.Context, input []*model.CreateConstellationInput) (*model.CreateConstellationsPayload, error) }
type QueryResolver ¶
type QueryResolver interface { Todos(ctx context.Context) ([]*model.Todo, error) Galaxies(ctx context.Context, after *string, before *string, first *int, last *int) (*model.GalaxyConnection, error) Constellations(ctx context.Context, after *string, before *string, first *int, last *int) (*model.ConstellationConnection, error) Planets(ctx context.Context, after *string, before *string, first *int, last *int, planetType *model.PlanetTypeEnum) (*model.PlanetConnection, error) Stars(ctx context.Context, after *string, before *string, first *int, last *int) (*model.StarConnection, error) Node(ctx context.Context, id string) (model.Node, error) }
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver Subscription() SubscriptionResolver Todo() TodoResolver }
type SubscriptionResolver ¶
type SubscriptionResolver interface {
Constellations(ctx context.Context) (<-chan []*model.Constellation, error)
}
Click to show internal directories.
Click to hide internal directories.