Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Reusable structure with the required metadata for talking to a GraphQL API. Client should be reused (not reinstantiated) across multiple requests.
func New ¶
New instantiates Client for `endpoint`. If you're looking for a way to instantiate Client with custom headers, check out NewWithHeader.
func NewWithHeader ¶
NewWithHeader instantiates Client for `endpoint` with custom headers. If you don't need to specify headers, check out New.
func (*Client) Query ¶
Query performs a single GraphQL query and returns its results as a Response.
The returned error does not represent GraphQL errors, those are stored within the Response itself.
func (*Client) QueryMany ¶
QueryMany performs multiple GraphQL queries concurrently and returns a channel that will hold their results as Response structures.
The returned errors do not represent GraphQL errors, those are stored within the Responses themselves.
QueryMany is non-blocking, but you should handle that by reading responses from the returned Response channel. The Response channel is closed automatically when all queries are done.