 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunSubscribe ¶
func RunSubscribe(t *testing.T, test *TestSubscription)
RunSubscribe runs a single GraphQL subscription test case.
func RunSubscribes ¶
func RunSubscribes(t *testing.T, tests []*TestSubscription)
RunSubscribes runs the given GraphQL subscription test cases as subtests.
Types ¶
type Test ¶
type Test struct {
	Context        context.Context
	Schema         *graphql.Schema
	Query          string
	OperationName  string
	Variables      map[string]interface{}
	ExpectedResult string
	ExpectedErrors []*errors.QueryError
	RawResponse    bool
}
    Test is a GraphQL test case to be used with RunTest(s).
type TestResponse ¶
type TestResponse struct {
	Data   json.RawMessage
	Errors []*errors.QueryError
}
    TestResponse models the expected response
type TestSubscription ¶
type TestSubscription struct {
	Name            string
	Schema          *graphql.Schema
	Query           string
	OperationName   string
	Variables       map[string]interface{}
	ExpectedResults []TestResponse
	ExpectedErr     error
}
    TestSubscription is a GraphQL test case to be used with RunSubscribe.
 Click to show internal directories. 
   Click to hide internal directories.