Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStopExecutionWithoutError = fmt.Errorf("stop execution without error")
ErrStopExecutionWithoutError can be returned from directive.Execute and works like "break" in for loops but on directives chain
Functions ¶
This section is empty.
Types ¶
type ConstructorFun ¶
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func NewDirectiveDefinition ¶
func NewDirectiveDefinition(name string, constructor ConstructorFun) Definition
func (Definition) Name ¶
func (d Definition) Name() string
type Deprecated ¶ added in v0.0.6
type Deprecated struct {
// contains filtered or unexported fields
}
func (*Deprecated) Define ¶ added in v0.0.6
func (d *Deprecated) Define(kind string, obj interface{}) error
type Directive ¶
type Directive interface {
// Execute defined directive (runtime)
Execute(
ctx context.Context,
source interface{},
resolvedValue interface{},
fieldArgs map[string]interface{},
) (interface{}, context.Context, error) // resolved value with updated context or error
// Define will take pointer to graphql object and can modify it on making schema stage
// kind => obj
// "field" => *graphql.Field
Define(kind string, obj interface{}) error
}
func NewDeprecated ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.