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 { DeleteEventResponse struct { DeleteEventID func(childComplexity int) int } DeleteUserResponse struct { DeleteUserID func(childComplexity int) int } EventListing struct { Description func(childComplexity int) int ID func(childComplexity int) int Organizer func(childComplexity int) int Title func(childComplexity int) int URL func(childComplexity int) int } Mutation struct { CreateEventListing func(childComplexity int, input model.CreateEventListingInput) int CreateUser func(childComplexity int, input model.CreateUserInput) int DeleteEventListing func(childComplexity int, id string) int DeleteUser func(childComplexity int, id string) int UpdateEventListing func(childComplexity int, id string, input model.UpdateEventListingInput) int UpdateUser func(childComplexity int, id string, input model.UpdateUserInput) int } Query struct { Event func(childComplexity int, id string) int Events func(childComplexity int) int EventsPaginated func(childComplexity int, page int, limit int) int User func(childComplexity int, id string) int Users func(childComplexity int) int } User struct { Email func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Password func(childComplexity int) int Role func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type MutationResolver ¶
type MutationResolver interface { CreateEventListing(ctx context.Context, input model.CreateEventListingInput) (*model.EventListing, error) UpdateEventListing(ctx context.Context, id string, input model.UpdateEventListingInput) (*model.EventListing, error) DeleteEventListing(ctx context.Context, id string) (*model.DeleteEventResponse, error) CreateUser(ctx context.Context, input model.CreateUserInput) (*model.User, error) UpdateUser(ctx context.Context, id string, input model.UpdateUserInput) (*model.User, error) DeleteUser(ctx context.Context, id string) (*model.DeleteUserResponse, error) }
type QueryResolver ¶
type QueryResolver interface { Events(ctx context.Context) ([]*model.EventListing, error) Event(ctx context.Context, id string) (*model.EventListing, error) EventsPaginated(ctx context.Context, page int, limit int) ([]*model.EventListing, error) Users(ctx context.Context) ([]*model.User, error) User(ctx context.Context, id string) (*model.User, error) }
type Resolver ¶
type Resolver struct{}
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
Mutation returns MutationResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.