Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Debug bool Endpoint string Host string Token string // contains filtered or unexported fields }
A Client is an HTTP client for our GraphQL endpoint.
type Request ¶
type Request struct { Query string `json:"query"` Variables map[string]interface{} `json:"variables"` // Header represent any request headers that will be set // when the request is made. Header http.Header `json:"-"` }
Request is a GraphQL request.
type Response ¶
type Response struct { Data interface{} Errors ResponseErrorsCollection }
Response wraps the result from our GraphQL server response including out-of-band errors and the data itself.
type ResponseError ¶
type ResponseError struct { Message string Locations []struct { Line int Column int } Extensions struct { Field string Argument string Value string AllowedValues []string `json:"allowed-values"` EnumType string `json:"enum-type"` } }
ResponseError represents the key-value pair of data returned by the GraphQL server to represent errors.
type ResponseErrorsCollection ¶
type ResponseErrorsCollection []ResponseError
ResponseErrorsCollection represents a slice of errors returned by the GraphQL server out-of-band from the actual data.
func (ResponseErrorsCollection) Error ¶
func (errs ResponseErrorsCollection) Error() string
Error turns a ResponseErrorsCollection into an acceptable error string that can be printed to the user.
Click to show internal directories.
Click to hide internal directories.