Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilRequest = errors.New("graphQL request not provided")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(endpoint string, options ...ClientOption) *Client
type ClientOption ¶
type ClientOption func(*Client)
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
type ClientRunner ¶
type ErrResponse ¶
type ErrResponse struct {
Message string
}
func (*ErrResponse) Error ¶
func (e *ErrResponse) Error() string
type Request ¶
func NewRequest ¶
func NewRequest(query string, options ...RequestOption) *Request
func (*Request) GetVariables ¶
func (r *Request) GetVariables() RequestVariables
func (*Request) SetVariable ¶
type RequestOption ¶
type RequestOption func(*Request)
func WithHTTPHeader ¶
func WithHTTPHeader(httpHeader http.Header) RequestOption
func WithVariables ¶
func WithVariables(variables RequestVariables) RequestOption
type RequestVariables ¶
type RequestVariables map[string]interface{}
Click to show internal directories.
Click to hide internal directories.