graphql: github.com/graphql-go/graphql/testutil Index | Files

package testutil

import "github.com/graphql-go/graphql/testutil"

Index

Package Files

introspection_query.go rules_test_harness.go testutil.go

Variables

var IntrospectionQuery = "" /* 1552 byte string literal not displayed */
var TestSchema *graphql.Schema

func ASTToJSON Uses

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

func ContainSubset Uses

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

func ContainSubsetSlice Uses

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

func Diff Uses

func Diff(want, got interface{}) []string

func EqualErrorMessage Uses

func EqualErrorMessage(expected, result *graphql.Result, i int) bool

func EqualFormattedError Uses

func EqualFormattedError(exp, act gqlerrors.FormattedError) bool

func EqualFormattedErrors Uses

func EqualFormattedErrors(expected, actual []gqlerrors.FormattedError) bool

func EqualResults Uses

func EqualResults(expected, result *graphql.Result) bool

func ExpectFailsRule Uses

func ExpectFailsRule(t *testing.T, rule graphql.ValidationRuleFn, queryString string, expectedErrors []gqlerrors.FormattedError)

func ExpectFailsRuleWithSchema Uses

func ExpectFailsRuleWithSchema(t *testing.T, schema *graphql.Schema, rule graphql.ValidationRuleFn, queryString string, expectedErrors []gqlerrors.FormattedError)

func ExpectPassesRule Uses

func ExpectPassesRule(t *testing.T, rule graphql.ValidationRuleFn, queryString string)

func ExpectPassesRuleWithSchema Uses

func ExpectPassesRuleWithSchema(t *testing.T, schema *graphql.Schema, rule graphql.ValidationRuleFn, queryString string)

func GetHero Uses

func GetHero(episode interface{}) interface{}

func RuleError Uses

func RuleError(message string, locs ...int) gqlerrors.FormattedError

func TestExecute Uses

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

func TestParse Uses

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

type StarWarsChar Uses

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 Uses

func GetDroid(id int) StarWarsChar

func GetHuman Uses

func GetHuman(id int) StarWarsChar

Package testutil imports 11 packages (graph) and is imported by 16 packages. Updated 2018-12-11. Refresh now. Tools for package owners.