Documentation ¶
Index ¶
- func Args(obj interface{}) graphql.FieldConfigArgument
- func ArgsOf(t reflect.Type) graphql.FieldConfigArgument
- func Field(t interface{}, options ...Option) graphql.Field
- func FieldOf(t reflect.Type, options ...Option) (graphql.Field, error)
- func InputObject(name string, obj interface{}) *graphql.InputObject
- func NewEncoder() *encoder
- func NewErrTypeNotRecognized(t reflect.Type) error
- func NewErrTypeNotRecognizedWithStruct(reason error, structType reflect.Type, structField reflect.StructField) error
- func Struct(obj interface{}) *graphql.Object
- type GraphqlResolver
- type GraphqlTyped
- type Option
- type TypeNotRecognizedWithStructError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Args ¶ added in v1.0.3
func Args(obj interface{}) graphql.FieldConfigArgument
Args Obtain the arguments property of a mutation object
func InputObject ¶ added in v1.0.3
func InputObject(name string, obj interface{}) *graphql.InputObject
func NewEncoder ¶
func NewEncoder() *encoder
func NewErrTypeNotRecognized ¶
Types ¶
type GraphqlResolver ¶
type GraphqlResolver interface { // GraphqlResolve is the method will be set to the `graphql.Field` as the // resolver method. GraphqlResolve(p graphql.ResolveParams) (interface{}, error) }
GraphqlResolver is the interface implemented by types that will provide a a resolver.
type GraphqlTyped ¶
type GraphqlTyped interface { // GraphqlType returns the `graphql.Type` that represents the data type that // implements this interface. GraphqlType() graphql.Type }
GraphqlTyped is the interface implemented by types that will provide a special `graphql.Type`.
type Option ¶
type Option interface {
Apply(dst interface{}) error
}
FieldOption describes how an option will behave when applied to a field.
func WithArgs ¶
func WithArgs(args ...interface{}) Option
WithArgs creates an `Option` that sets the arguments for a field.
It can be applied to: * Fields;
func WithDefaultvalue ¶
func WithDefaultvalue(defaultValue interface{}) Option
WithDefaultvalue creates an `Option` that provides sets the description for arguments.
It can be applied to: * Arguments;
func WithDeprecationReason ¶
WithDeprecationReason creates an `Option` that sets the deprecation reason for fields.
It can be applied to: * Fields;
func WithDescription ¶
WithDescription creates an `Option` that provides sets the description for fields, objects and arguments.
It can be applied to: * Field; * Arguments; * Objects;
func WithResolve ¶
func WithResolve(resolver graphql.FieldResolveFn) Option
WithResolver creates an `Option` that sets the resolver for fields.
It can be applied to: * Fields;
type TypeNotRecognizedWithStructError ¶
type TypeNotRecognizedWithStructError struct {
// contains filtered or unexported fields
}
func (*TypeNotRecognizedWithStructError) Error ¶
func (err *TypeNotRecognizedWithStructError) Error() string