Documentation ¶
Overview ¶
client is used internally for testing. See readme for alternatives
Index ¶
- type Client
- func (p *Client) MustPost(query string, response interface{}, options ...Option)
- func (p *Client) Post(query string, response interface{}, options ...Option) (resperr error)
- func (p *Client) RawPost(query string, options ...Option) (*ResponseData, error)
- func (p *Client) Websocket(query string, options ...Option) *Subscription
- func (p *Client) WebsocketWithPayload(query string, initPayload map[string]interface{}, options ...Option) *Subscription
- type Option
- type RawJsonError
- type Request
- type ResponseData
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for graphql requests
func (*Client) RawPost ¶ added in v0.6.0
func (p *Client) RawPost(query string, options ...Option) (*ResponseData, error)
func (*Client) Websocket ¶
func (p *Client) Websocket(query string, options ...Option) *Subscription
func (*Client) WebsocketWithPayload ¶ added in v0.6.0
func (p *Client) WebsocketWithPayload(query string, initPayload map[string]interface{}, options ...Option) *Subscription
type RawJsonError ¶
type RawJsonError struct {
json.RawMessage
}
func (RawJsonError) Error ¶
func (r RawJsonError) Error() string
type ResponseData ¶ added in v0.6.0
type ResponseData struct { Data interface{} Errors json.RawMessage Extensions map[string]interface{} }
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.