Documentation ¶
Index ¶
- Variables
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type Article
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type EntityRepresentation
- type EntityResolver
- type EntityWithIndex
- type Mutation
- type MutationResolver
- type Query
- type QueryResolver
- type ResolverRoot
- type UpdateArticle
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownType = errors.New("unknown type") ErrTypeNotFound = errors.New("type not found") )
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
type Article ¶
type ComplexityRoot ¶
type ComplexityRoot struct { Article struct { Description func(childComplexity int) int ID func(childComplexity int) int Image func(childComplexity int) int Name func(childComplexity int) int Price func(childComplexity int) int Stock func(childComplexity int) int } Entity struct { FindArticleByID func(childComplexity int, id string) int } Mutation struct { CreateArticle func(childComplexity int, input UpdateArticle) int DeleteArticle func(childComplexity int, id string) int UpdateArticle func(childComplexity int, input UpdateArticle) int } Query struct { GetArticle func(childComplexity int, id string) int SearchArticles func(childComplexity int, criteria string) int // contains filtered or unexported fields } // contains filtered or unexported fields }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type EntityRepresentation ¶
EntityRepresentation is the JSON representation of an entity sent by the Router used as the inputs for us to resolve.
We make it a map because we know the top level JSON is always an object.
type EntityResolver ¶
type EntityWithIndex ¶
type EntityWithIndex struct {
// contains filtered or unexported fields
}
type MutationResolver ¶
type QueryResolver ¶
type ResolverRoot ¶
type ResolverRoot interface { Entity() EntityResolver Mutation() MutationResolver Query() QueryResolver }
Click to show internal directories.
Click to hide internal directories.