Documentation ¶
Index ¶
- Constants
- func LoadQuery(t TestingTB, fileName string, variables QueryVariables) []byte
- func RequestBody(t TestingTB, query string, variables QueryVariables) []byte
- func Schema(t TestingTB) []byte
- func SetRelativePathToStarWarsPackage(path string)
- type GraphqlRequest
- type QueryVariables
- type TestCase
- type TestingTB
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" 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 RequestBody ¶
func RequestBody(t TestingTB, query string, variables QueryVariables) []byte
func SetRelativePathToStarWarsPackage ¶
func SetRelativePathToStarWarsPackage(path string)
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{}
Click to show internal directories.
Click to hide internal directories.