func (c *Client) Mutate(ctx context.Context, operation *Operation) error {
	return c.MutateWithHeaders(ctx, operation, nil)
}
Mutate is a wrapper around MutateWithHeaders that passes no headers.
package goql
import (
	"context"
	"net/http"
)
type ErrorMapper func(int, Errors) error
type Client struct {
	url         string
	httpClient  *http.Client
	errorMapper ErrorMapper
}
type ClientOptions struct {
	HTTPClient  *http.Client
	ErrorMapper ErrorMapper
}
var DefaultClientOptions = ClientOptions{
	HTTPClient:  nil,
	ErrorMapper: nil,
}
var defaultErrorMapper = func(_ int, errs Errors) error {
	return errs
}
func NewClient(clientURL string, options ClientOptions) *Client {
	if options.HTTPClient == nil {
		options.HTTPClient = http.DefaultClient
	}
	if options.ErrorMapper == nil {
		options.ErrorMapper = defaultErrorMapper
	}
	return &Client{
		url:         clientURL,
		httpClient:  options.HTTPClient,
		errorMapper: options.ErrorMapper,
	}
}
func (c *Client) QueryWithHeaders(ctx context.Context, operation *Operation, headers http.Header) error {
	if headers == nil {
		headers = http.Header{}
	}
	return c.doStruct(ctx, opQuery, operation, headers)
}
func (c *Client) Query(ctx context.Context, operation *Operation) error {
	return c.QueryWithHeaders(ctx, operation, nil)
}
func (c *Client) MutateWithHeaders(ctx context.Context, operation *Operation, headers http.Header) error {
	if headers == nil {
		headers = http.Header{}
	}
	return c.doStruct(ctx, opMutation, operation, headers)
}