Documentation ¶
Index ¶
- Variables
- func ASTToJSON(t testing.TB, a ast.Node) any
- func ContainSubset(super, sub map[string]any) bool
- func ContainSubsetSlice(super, sub []any) bool
- func Diff(a, b any) []string
- func EqualErrorMessage(expected, result *graphql.Result, i int) bool
- func ExpectFailsRule(t *testing.T, rule graphql.ValidationRuleFn, queryString string, ...)
- func ExpectFailsRuleWithSchema(t *testing.T, schema *graphql.Schema, rule graphql.ValidationRuleFn, ...)
- func ExpectPassesRule(t *testing.T, rule graphql.ValidationRuleFn, queryString string)
- func ExpectPassesRuleWithSchema(t *testing.T, schema *graphql.Schema, rule graphql.ValidationRuleFn, ...)
- func GetHero(episode any) any
- func RuleError(message string, locs ...int) gqlerrors.FormattedError
- func TestExecute(t testing.TB, ctx context.Context, ep graphql.ExecuteParams) *graphql.Result
- func TestParse(t testing.TB, query string) *ast.Document
- type StarWarsChar
Constants ¶
This section is empty.
Variables ¶
View Source
var IntrospectionQuery = `` /* 1556-byte string literal not displayed */
View Source
var TestSchema *graphql.Schema
Functions ¶
func ContainSubset ¶
func ContainSubsetSlice ¶
func ExpectFailsRule ¶
func ExpectFailsRule(t *testing.T, rule graphql.ValidationRuleFn, queryString string, expectedErrors []gqlerrors.FormattedError)
func ExpectFailsRuleWithSchema ¶
func ExpectFailsRuleWithSchema(t *testing.T, schema *graphql.Schema, rule graphql.ValidationRuleFn, queryString string, expectedErrors []gqlerrors.FormattedError)
func ExpectPassesRule ¶
func ExpectPassesRule(t *testing.T, rule graphql.ValidationRuleFn, queryString string)
func TestExecute ¶
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
Click to show internal directories.
Click to hide internal directories.