starwars

package
v2.0.0-rc.136 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FileSimpleHeroQuery                 = "testdata/queries/simple_hero.query"
	FileHeroWithOperationNameQuery      = "testdata/queries/hero_with_operation_name.query"
	FileHeroWithAliasesQuery            = "testdata/queries/hero_with_aliases.query"
	FileDroidWithArgQuery               = "testdata/queries/droid_with_arg.query"
	FileDroidWithArgAndVarQuery         = "testdata/queries/droid_with_arg_and_var.query"
	FileFragmentsQuery                  = "testdata/queries/fragments.query"
	FileDirectivesIncludeQuery          = "testdata/queries/directives_include.query"
	FileDirectivesSkipQuery             = "testdata/queries/directives_skip.query"
	FileCreateReviewMutation            = "testdata/mutations/create_review.mutation"
	FileInlineFragmentsQuery            = "testdata/queries/inline_fragments.query"
	FileUnionQuery                      = "testdata/queries/inline_fragments.query"
	FileRemainingJedisSubscription      = "testdata/subscriptions/remaining_jedis.subscription"
	FileIntrospectionQuery              = "testdata/queries/introspection.query"
	FileIntrospectionQueryWithTypenames = "testdata/queries/introspection_with_typenames.query"
	FileMultiQueries                    = "testdata/queries/multi_queries.query"
	FileMultiQueriesWithArguments       = "testdata/queries/multi_queries_with_arguments.query"
	FileInvalidQuery                    = "testdata/queries/invalid.query"
	FileInvalidFragmentsQuery           = "testdata/queries/invalid_fragments.query"
	FileInterfaceFragmentsOnUnion       = "testdata/queries/interface_fragments_on_union.graphql"
)

Variables

This section is empty.

Functions

func LoadQuery

func LoadQuery(t TestingTB, fileName string, variables QueryVariables) []byte

func RequestBody

func RequestBody(t TestingTB, query string, variables QueryVariables) []byte

func Schema

func Schema(t TestingTB) []byte

Types

type GraphqlRequest

type GraphqlRequest struct {
	OperationName string          `json:"operationName"`
	Variables     json.RawMessage `json:"variables"`
	Query         string          `json:"query"`
}

type QueryVariables

type QueryVariables map[string]interface{}

type TestCase

type TestCase struct {
	Name        string
	RequestBody []byte
}

type TestingTB

type TestingTB interface {
	Errorf(format string, args ...interface{})
	Helper()
	FailNow()
}

Jump to

Keyboard shortcuts

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