Documentation ¶
Overview ¶
GraphQL is a simple low-level client modified from https://github.com/machinebox/graphql
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a struct used to interact with any general GraphQL API
func MakeClient ¶
func MakeClient(endpoint string, options ...ClientOption) *Client
MakeNewClient makes a new Client capable of making GraphQL requests.
func (*Client) PostRequest ¶
type ClientOption ¶
type ClientOption func(*Client)
ClientOptions is function used to modify Client behaviour
func SetMultiForm ¶
func SetMultiForm() ClientOption
type GraphError ¶
type GraphError struct {
Message string
}
func (GraphError) Error ¶
func (e GraphError) Error() string
type GraphResponse ¶
type GraphResponse struct { Data interface{} Errors []GraphError }
type Request ¶
type Request struct { Query string Variables map[string]interface{} Files []File Header http.Header }
Request is a GraphQL struct containing info used for post request.
func MakeRequest ¶
NewRequest makes a new Request with a json string.
Click to show internal directories.
Click to hide internal directories.