Documentation
¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func UnmarshalAudioWrite(v interface{}) (types.AudioWrite, error)
- func UnmarshalBookWrite(v interface{}) (types.BookWrite, error)
- func UnmarshalProductFilter(v interface{}) (types.ProductFilter, error)
- func UnmarshalVideoWrite(v interface{}) (types.VideoWrite, error)
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type MutationResolver
- type QueryResolver
- type Request
- type ResolverRoot
- type Response
- type Schema
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 UnmarshalAudioWrite ¶
func UnmarshalAudioWrite(v interface{}) (types.AudioWrite, error)
func UnmarshalBookWrite ¶
func UnmarshalProductFilter ¶
func UnmarshalProductFilter(v interface{}) (types.ProductFilter, error)
func UnmarshalVideoWrite ¶
func UnmarshalVideoWrite(v interface{}) (types.VideoWrite, error)
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct {
Audio struct {
Id func(childComplexity int) int
Name func(childComplexity int) int
Description func(childComplexity int) int
Value func(childComplexity int) int
Singer func(childComplexity int) int
Compositor func(childComplexity int) int
Duration func(childComplexity int) int
}
Book struct {
Id func(childComplexity int) int
Name func(childComplexity int) int
Description func(childComplexity int) int
Value func(childComplexity int) int
Isbn func(childComplexity int) int
Author func(childComplexity int) int
Flavor func(childComplexity int) int
}
Mutation struct {
SetBook func(childComplexity int, book types.BookWrite) int
SetAudio func(childComplexity int, audio types.AudioWrite) int
SetVideo func(childComplexity int, video types.VideoWrite) int
}
Query struct {
Book func(childComplexity int, id string) int
Audio func(childComplexity int, id string) int
Video func(childComplexity int, id string) int
ProductBy func(childComplexity int, filter *types.ProductFilter) int
Search func(childComplexity int, filter *types.ProductFilter) int
}
Video struct {
Id func(childComplexity int) int
Name func(childComplexity int) int
Description func(childComplexity int) int
Value func(childComplexity int) int
Director func(childComplexity int) int
Writer func(childComplexity int) int
Actors func(childComplexity int) int
Duration func(childComplexity int) int
}
}
type Config ¶
type Config struct {
Resolvers ResolverRoot
Directives DirectiveRoot
Complexity ComplexityRoot
}
type DirectiveRoot ¶
type DirectiveRoot struct {
}
type MutationResolver ¶
type QueryResolver ¶
type QueryResolver interface {
Book(ctx context.Context, id string) (*types.Book, error)
Audio(ctx context.Context, id string) (*types.Audio, error)
Video(ctx context.Context, id string) (*types.Video, error)
ProductBy(ctx context.Context, filter *types.ProductFilter) (types.Product, error)
Search(ctx context.Context, filter *types.ProductFilter) (types.SearchResult, error)
}
type ResolverRoot ¶
type ResolverRoot interface {
Mutation() MutationResolver
Query() QueryResolver
}
type Schema ¶
type Schema struct {
graphql.ExecutableSchema
}
func NewSchema ¶
func NewSchema(resolverRoot ResolverRoot) Schema
Click to show internal directories.
Click to hide internal directories.