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.
func UnmarshalDateFilter ¶
func UnmarshalDateFilter(v interface{}) (models.DateFilter, error)
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Element struct { Child func(childComplexity int) int Error func(childComplexity int) int Mismatched func(childComplexity int) int } Query struct { Path func(childComplexity int) int Date func(childComplexity int, filter models.DateFilter) int Viewer func(childComplexity int) int JsonEncoding func(childComplexity int) int Error func(childComplexity int, typeArg *models.ErrorType) int } User struct { Name func(childComplexity int) int Likes func(childComplexity int) int } Viewer struct { User func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type CustomError ¶
func (*CustomError) Error ¶
func (e *CustomError) Error() string
type DirectiveRoot ¶
type ElementResolver ¶
type QueryResolver ¶
type QueryResolver interface { Path(ctx context.Context) ([]*models.Element, error) Date(ctx context.Context, filter models.DateFilter) (bool, error) Viewer(ctx context.Context) (*models.Viewer, error) JSONEncoding(ctx context.Context) (string, error) Error(ctx context.Context, typeArg *models.ErrorType) (bool, error) }
type Resolver ¶
type Resolver struct{}
func (*Resolver) Element ¶
func (r *Resolver) Element() ElementResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
func (*Resolver) User ¶
func (r *Resolver) User() UserResolver
type ResolverRoot ¶
type ResolverRoot interface { Element() ElementResolver Query() QueryResolver User() UserResolver }
type UserResolver ¶
Click to show internal directories.
Click to hide internal directories.