graph

package module
v1.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: LGPL-3.0 Imports: 6 Imported by: 0

README

Build Status codecov Coverage Status Go Report Card Codacy Badge

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatValue

func FormatValue(v Value) string

FormatValue returns a string that describes the value

func ParseID

func ParseID(v Value) uintptr

ParseID turns a value to id

Types

type Array

type Array []Value

Array is an ordered collection of values

func (Array) String

func (v Array) String() string

type Callback

type Callback func(Value) bool

Callback is called by the delivery person

type Field

type Field struct {
	Args      Object
	Selection SelectionSet
}

Field represents a field in an operation

func (Field) String

func (f Field) String() string

type Node

type Node interface {
	Query(context.Context, *Field) (Value, []error)
	Mutate(context.Context, *Field) (Value, []error)
	Subscribe(context.Context, *Field, Callback) (uintptr, []error)
	Unsubscribe(context.Context, uintptr) []error
}

Node interface

type Object

type Object map[string]Value

Object is an unordered set of name/value pairs

func (Object) String

func (v Object) String() string

type SelectionSet

type SelectionSet map[string]*Field

SelectionSet in an operation selects the set of information it needs, and will receive exactly that information and nothing more, avoiding over‐fetching and under‐fetching data.

type Value

type Value interface{}

Value can be a string, or a number, or true or false or null

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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