func TestDoCustom(t *testing.T) {
	t.Skip()
	ts := graphql_test.NewServer(t, true)
	t.Cleanup(ts.Close)
	client := NewClient(ts.URL, DefaultClientOptions)
	var testOperation graphql_test.GetEntity
	testQuery, err := MarshalQuery(testOperation, nil)
	if err != nil {
		t.Fatalf("error marshaling test query: %v", err)
	}
	tt := []struct {
		Name             string
		Query            string
		Variables        map[string]interface{}
		ResponseType     interface{}
		Headers          http.Header
		ExpectedResponse interface{}
		ShouldErr        bool
	}{
		{
			Name:             "SuccessReturnData",
			Query:            testQuery,
			Variables:        testOperation.Variables(),
			ResponseType:     &testOperation,
			Headers:          http.Header{},
			ExpectedResponse: testOperation.ExpectedResponse(),
			ShouldErr:        false,
		},
		{
			Name:             "SuccessDiscardData",
			Query:            testQuery,
			Variables:        testOperation.Variables(),
			ResponseType:     nil,
			Headers:          http.Header{},
			ExpectedResponse: nil,
			ShouldErr:        false,
		},
		{
			Name:             "ErrorInvalidOperation",
			Query:            "foobarbaz",
			Variables:        nil,
			ResponseType:     nil,
			Headers:          http.Header{},
			ExpectedResponse: nil,
			ShouldErr:        true,
		},
	}
	for _, test := range tt {
		test := test
		fn := func(t *testing.T) {
			t.Parallel()
			if err := client.doCustom(context.Background(), test.Query, test.Variables, test.ResponseType, test.Headers); err != nil {
				if test.ShouldErr {
					return
				}
				t.Fatalf("error doing graphql custom operation: %v", err)
			}
			if test.ExpectedResponse != nil {
				ts.DiffResponse(test.ExpectedResponse, test.ResponseType)
			}
		}
		t.Run(test.Name, fn)
	}
}
TestDoCustom tests the doCustom pointer receiver function on the Client type.
package goql
import (
	"context"
	"net/http"
	"testing"
	"github.com/getoutreach/goql/graphql_test"
)
func TestErrorsErrorInterface(t *testing.T) {
	t.Parallel()
	err := Errors{
		{
			Message: "Foo",
		},
		{
			Message: "Bar",
		},
		{
			Message: "Baz",
		},
	}
	var expected string
	for i := range err {
		expected += err[i].Message
		if i != len(err)-1 {
			expected += ", "
		}
	}
	if e, a := expected, err.Error(); e != a {
		t.Errorf("expected error interface to return \"%s\", got \"%s\"", e, a)
	}
	err = Errors{}
	expected = ""
	if e, a := expected, err.Error(); e != a {
		t.Errorf("expected error interface to return \"%s\", got \"%s\"", e, a)
	}
}