resolvable

package
v0.0.0-...-743acb9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2017 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetaFieldSchema = Field{
	Field: schema.Field{
		Name: "__schema",
		Type: schema.Meta.Types["__Schema"],
	},
	TraceLabel: fmt.Sprintf("GraphQL field: __schema"),
}
View Source
var MetaFieldType = Field{
	Field: schema.Field{
		Name: "__type",
		Type: schema.Meta.Types["__Type"],
	},
	TraceLabel: fmt.Sprintf("GraphQL field: __type"),
}
View Source
var MetaFieldTypename = Field{
	Field: schema.Field{
		Name: "__typename",
		Type: &common.NonNull{OfType: schema.Meta.Types["String"]},
	},
	TraceLabel: fmt.Sprintf("GraphQL field: __typename"),
}

Functions

This section is empty.

Types

type Field

type Field struct {
	schema.Field
	TypeName    string
	MethodIndex int
	HasContext  bool
	ArgsPacker  *StructPacker
	HasError    bool
	ValueExec   Resolvable
	TraceLabel  string
}

type List

type List struct {
	Elem Resolvable
}

type Object

type Object struct {
	Name           string
	Fields         map[string]*Field
	TypeAssertions map[string]*TypeAssertion
}
var MetaSchema *Object
var MetaType *Object

type Resolvable

type Resolvable interface {
	// contains filtered or unexported methods
}

type Scalar

type Scalar struct{}

type Schema

type Schema struct {
	schema.Schema
	Query    Resolvable
	Mutation Resolvable
	Resolver reflect.Value
}

func ApplyResolver

func ApplyResolver(s *schema.Schema, resolver interface{}) (*Schema, error)

type StructPacker

type StructPacker struct {
	// contains filtered or unexported fields
}

func (*StructPacker) Pack

func (p *StructPacker) Pack(value interface{}) (reflect.Value, error)

type TypeAssertion

type TypeAssertion struct {
	MethodIndex int
	TypeExec    Resolvable
}

type Unmarshaler

type Unmarshaler interface {
	ImplementsGraphQLType(name string) bool
	UnmarshalGraphQL(input interface{}) error
}

type ValuePacker

type ValuePacker struct {
	ValueType reflect.Type
}

func (*ValuePacker) Pack

func (p *ValuePacker) Pack(value interface{}) (reflect.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL