Documentation ¶
Index ¶
- func Handler(service e2e.Service, hooks *twirp.ServerHooks) *handler.Server
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func Playground(title, endpoint string) http.Handler
- type BreadRespResolver
- type ChangeMeRespResolver
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type MutationResolver
- type Previous
- type QueryResolver
- type Resolver
- type ResolverRoot
- type TranslateRespResolver
- type Translations
- type Words
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler returns a handler to the GraphQL API. Server Hooks are optional but if present, they will be injected as GraphQL middleware.
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func Playground ¶
Playground is a proxy to github.com/99designs/gqlgen/handler.Playground All you need to do is provide a title and the URL Path to the GraphQL handler
Types ¶
type BreadRespResolver ¶
type ChangeMeRespResolver ¶
type ComplexityRoot ¶
type ComplexityRoot struct { BreadResp struct { Answer func(childComplexity int) int } BreadRespAnswerName struct { Name func(childComplexity int) int } BreadRespAnswerToasted struct { Toasted func(childComplexity int) int } ChangeMeResp struct { Answer func(childComplexity int) int Name func(childComplexity int) int Previous func(childComplexity int) int } ChangeMeRespAnswerChanged struct { Changed func(childComplexity int) int } ChangeMeRespAnswerNewName struct { NewName func(childComplexity int) int } HelloResp struct { Text func(childComplexity int) int } Mutation struct { ChangeMe func(childComplexity int, req *e2e.ChangeMeReq) int } PaintersResp struct { AllPainters func(childComplexity int) int BestPainter func(childComplexity int) int } PaintersPainter struct { Name func(childComplexity int) int } Query struct { Bread func(childComplexity int, req *e2e.BreadReq) int GetPainters func(childComplexity int) int Hello func(childComplexity int, req *e2e.HelloReq) int TrafficJam func(childComplexity int, req *e2e.TrafficJamReq) int Translate func(childComplexity int, req *e2e.TranslateReq) int } TrafficJamResp struct { Next func(childComplexity int) int } TranslateResp struct { Translations 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 {
ChangeMe(ctx context.Context, req *e2e.ChangeMeReq) (*e2e.ChangeMeResp, error)
}
type Previous ¶
type Previous map[string]*e2e.ChangeMeResp
func (Previous) MarshalGQL ¶
func (*Previous) UnmarshalGQL ¶
type QueryResolver ¶
type QueryResolver interface { Hello(ctx context.Context, req *e2e.HelloReq) (*e2e.HelloResp, error) TrafficJam(ctx context.Context, req *e2e.TrafficJamReq) (*e2e.TrafficJamResp, error) GetPainters(ctx context.Context) (*e2e.PaintersResp, error) Translate(ctx context.Context, req *e2e.TranslateReq) (*e2e.TranslateResp, error) Bread(ctx context.Context, req *e2e.BreadReq) (*e2e.BreadResp, error) }
type Resolver ¶
func (*Resolver) BreadResp ¶
func (r *Resolver) BreadResp() BreadRespResolver
func (*Resolver) ChangeMeResp ¶
func (r *Resolver) ChangeMeResp() ChangeMeRespResolver
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
func (*Resolver) TranslateResp ¶
func (r *Resolver) TranslateResp() TranslateRespResolver
type ResolverRoot ¶
type ResolverRoot interface { BreadResp() BreadRespResolver ChangeMeResp() ChangeMeRespResolver Mutation() MutationResolver Query() QueryResolver TranslateResp() TranslateRespResolver }
type TranslateRespResolver ¶
type TranslateRespResolver interface {
Translations(ctx context.Context, obj *e2e.TranslateResp) (Translations, error)
}
type Translations ¶
func (Translations) MarshalGQL ¶
func (scalar Translations) MarshalGQL(w io.Writer)
func (*Translations) UnmarshalGQL ¶
func (scalar *Translations) UnmarshalGQL(v interface{}) error
Click to show internal directories.
Click to hide internal directories.