Documentation ¶
Index ¶
- Variables
- type Argument
- type ArgumentValidator
- type Array
- type Enum
- type EnumType
- type Field
- func (f *Field) ArgsInput() *Input
- func (f *Field) DeprecationReason() string
- func (f *Field) Description() string
- func (f *Field) JSONName() string
- func (f *Field) Object() TypeWithFields
- func (f *Field) Resolver() *Resolver
- func (f *Field) StructField() reflect.StructField
- func (f *Field) Subscriber() *Subscriber
- func (f *Field) Type() Type
- type Input
- type InputValidator
- type Interface
- type InterfaceType
- type Kind
- type Nullable
- type Object
- type ResolveType
- type Resolver
- type ResolverArgType
- type Scalar
- type ScalarKind
- type ScalarType
- type Subscriber
- type Type
- type TypeWithElement
- type TypeWithFields
- type Union
- type UnionType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotObject = fmt.Errorf("type is not object") ErrNotInputObject = fmt.Errorf("type is not input object") ErrNotUnion = fmt.Errorf("type is not union") ErrNotInterface = fmt.Errorf("type is not interface") ErrNotScalar = fmt.Errorf("type is not scalar") ErrNotEnum = fmt.Errorf("type is not enum") )
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
// contains filtered or unexported fields
}
func NewArgument ¶
func NewArgument(input *Input, field reflect.StructField) (*Argument, error)
func (*Argument) DefaultValue ¶
func (*Argument) Description ¶
func (*Argument) StructField ¶ added in v0.1.6
func (arg *Argument) StructField() reflect.StructField
func (*Argument) Validator ¶ added in v0.1.6
func (arg *Argument) Validator() *ArgumentValidator
type ArgumentValidator ¶ added in v0.1.6
type ArgumentValidator struct {
// contains filtered or unexported fields
}
func NewArgumentValidator ¶ added in v0.1.6
func NewArgumentValidator(argument *Argument) (*ArgumentValidator, error)
func (*ArgumentValidator) ReflectMethod ¶ added in v0.1.6
func (v *ArgumentValidator) ReflectMethod() reflect.Method
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func (*Array) ReflectType ¶
type Enum ¶
type Enum struct {
// contains filtered or unexported fields
}
func (*Enum) ReflectType ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func NewField ¶
func NewField(t TypeWithFields, field reflect.StructField) (*Field, error)
func (*Field) DeprecationReason ¶
func (*Field) Description ¶
func (*Field) Object ¶
func (f *Field) Object() TypeWithFields
func (*Field) StructField ¶ added in v0.1.5
func (f *Field) StructField() reflect.StructField
func (*Field) Subscriber ¶
func (f *Field) Subscriber() *Subscriber
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
func (*Input) ReflectType ¶
func (*Input) Validator ¶ added in v0.1.6
func (i *Input) Validator() *InputValidator
type InputValidator ¶ added in v0.1.6
type InputValidator struct {
// contains filtered or unexported fields
}
func NewInputValidator ¶ added in v0.1.6
func NewInputValidator(input *Input) (*InputValidator, error)
func (*InputValidator) ReflectMethod ¶ added in v0.1.6
func (v *InputValidator) ReflectMethod() reflect.Method
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
func (*Interface) ReflectType ¶
type InterfaceType ¶
type InterfaceType struct{}
type Nullable ¶
type Nullable struct {
// contains filtered or unexported fields
}
func (*Nullable) ReflectType ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (*Object) Interfaces ¶
func (*Object) ReflectType ¶
type ResolveType ¶ added in v0.1.1
type ResolveType int
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func (*Resolver) ArgsSignature ¶
func (r *Resolver) ArgsSignature() []ResolverArgType
func (*Resolver) ReflectMethod ¶ added in v0.1.5
func (*Resolver) ReturnsThunk ¶ added in v0.1.1
type ResolverArgType ¶
type ResolverArgType int
const ( ResolverArgOther ResolverArgType = iota ResolverArgInput ResolverArgContext ResolverArgInfo )
type Scalar ¶
type Scalar struct {
// contains filtered or unexported fields
}
func (Scalar) ReflectType ¶
type ScalarType ¶
type ScalarType interface { json.Marshaler json.Unmarshaler }
type Subscriber ¶
type Subscriber = Resolver
type TypeWithElement ¶
type TypeWithFields ¶
type Union ¶
type Union struct {
// contains filtered or unexported fields
}
func (*Union) ReflectType ¶
Click to show internal directories.
Click to hide internal directories.