resolvable

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 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
	HasFieldChecker bool
	HasError        bool
	ArgsPacker      *packer.StructPacker
	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 TypeAssertion

type TypeAssertion struct {
	MethodIndex int
	TypeExec    Resolvable
}

Jump to

Keyboard shortcuts

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