Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type Circle
- type Config
- type DirectiveRoot
- type Element
- type ElementResolver
- type ForcedResolver
- type ForcedResolverResolver
- type InnerInput
- type InnerObject
- type Keywords
- type OuterInput
- type OuterObject
- type QueryResolver
- type Rectangle
- type RecursiveInputSlice
- type Resolver
- type ResolverRoot
- type Shape
- type ShapeUnion
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 Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { }
type ElementResolver ¶
type ElementResolver struct{}
func (*ElementResolver) Element_child ¶
func (*ElementResolver) Element_error ¶
func (*ElementResolver) Query_path ¶
func (r *ElementResolver) Query_path(ctx context.Context) ([]Element, error)
type ForcedResolver ¶
type ForcedResolver struct {
Field Circle
}
type ForcedResolverResolver ¶
type ForcedResolverResolver interface {
Field(ctx context.Context, obj *ForcedResolver) (*Circle, error)
}
type InnerInput ¶
type InnerInput struct {
ID int `json:"id"`
}
func UnmarshalInnerInput ¶
func UnmarshalInnerInput(v interface{}) (InnerInput, error)
type InnerObject ¶
type InnerObject struct {
ID int `json:"id"`
}
type Keywords ¶
type Keywords struct { Break string `json:"break"` Default string `json:"default"` Func string `json:"func"` Interface string `json:"interface"` Select string `json:"select"` Case string `json:"case"` Defer string `json:"defer"` Go string `json:"go"` Map string `json:"map"` Struct string `json:"struct"` Chan string `json:"chan"` Else string `json:"else"` Goto string `json:"goto"` Package string `json:"package"` Switch string `json:"switch"` Const string `json:"const"` Fallthrough string `json:"fallthrough"` If string `json:"if"` Range string `json:"range"` Type string `json:"type"` Continue string `json:"continue"` For string `json:"for"` Import string `json:"import"` Return string `json:"return"` Var string `json:"var"` }
func UnmarshalKeywords ¶
type OuterInput ¶
type OuterInput struct {
Inner InnerInput `json:"inner"`
}
func UnmarshalOuterInput ¶
func UnmarshalOuterInput(v interface{}) (OuterInput, error)
type OuterObject ¶
type OuterObject struct {
Inner InnerObject `json:"inner"`
}
type QueryResolver ¶
type QueryResolver interface { InvalidIdentifier(ctx context.Context) (*invalid_packagename.InvalidIdentifier, error) Collision(ctx context.Context) (*introspection1.It, error) MapInput(ctx context.Context, input *map[string]interface{}) (*bool, error) Recursive(ctx context.Context, input *RecursiveInputSlice) (*bool, error) NestedInputs(ctx context.Context, input [][]*OuterInput) (*bool, error) NestedOutputs(ctx context.Context) ([][]*OuterObject, error) Keywords(ctx context.Context, input *Keywords) (bool, error) Shapes(ctx context.Context) ([]*Shape, error) KeywordArgs(ctx context.Context, breakArg string, defaultArg string, funcArg string, interfaceArg string, selectArg string, caseArg string, deferArg string, goArg string, mapArg string, structArg string, chanArg string, elseArg string, gotoArg string, packageArg string, switchArg string, constArg string, fallthroughArg string, ifArg string, rangeArg string, typeArg string, continueArg string, forArg string, importArg string, returnArg string, varArg string) (bool, error) }
type RecursiveInputSlice ¶
type RecursiveInputSlice struct {
Self []RecursiveInputSlice
}
func UnmarshalRecursiveInputSlice ¶
func UnmarshalRecursiveInputSlice(v interface{}) (RecursiveInputSlice, error)
type Resolver ¶
type Resolver struct{}
func (*Resolver) ForcedResolver ¶
func (r *Resolver) ForcedResolver() ForcedResolverResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
type ResolverRoot ¶
type ResolverRoot interface { ForcedResolver() ForcedResolverResolver Query() QueryResolver }
type ShapeUnion ¶
type ShapeUnion interface {
Area() float64
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.