testutil

package
v0.0.0-...-474a9cf Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IntrospectionQuery = `` /* 1093-byte string literal not displayed */

Functions

func ASTToJSON

func ASTToJSON(t *testing.T, a ast.Node) interface{}

func ContainSubset

func ContainSubset(super map[string]interface{}, sub map[string]interface{}) bool

func ContainSubsetSlice

func ContainSubsetSlice(super []interface{}, sub []interface{}) bool

func Diff

func Diff(a, b interface{}) []string

func GetHero

func GetHero(episode interface{}) interface{}

func TestExecute

func TestExecute(t *testing.T, ep graphql.ExecuteParams) *graphql.Result

func TestParse

func TestParse(t *testing.T, query string) *ast.Document

Types

type StarWarsChar

type StarWarsChar struct {
	Id              string
	Name            string
	Friends         []StarWarsChar
	AppearsIn       []int
	HomePlanet      string
	PrimaryFunction string
}
var (
	Luke           StarWarsChar
	Vader          StarWarsChar
	Han            StarWarsChar
	Leia           StarWarsChar
	Tarkin         StarWarsChar
	Threepio       StarWarsChar
	Artoo          StarWarsChar
	HumanData      map[int]StarWarsChar
	DroidData      map[int]StarWarsChar
	StarWarsSchema graphql.Schema
)

func GetDroid

func GetDroid(id int) StarWarsChar

func GetHuman

func GetHuman(id int) StarWarsChar

Jump to

Keyboard shortcuts

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