INNER CODE UNIT · Go
func
machinebox/graphql · graphql.go:75
func (c *Client) logf(format string, args ...interface{}) {
c.Log(fmt.Sprintf(format, args...))
}
// Run executes the query and unmarshals the response from the data field
// into the response object.
// Pass in a nil response object to skip response parsing.
// If the request fails or the server returns an error, the first error
// will be returned.
func (c *Client) Run(ctx context.Context, req *Request, resp interface{}) error {
select {
case <-ctx.Done():
return ctx.Err()
default:
}
if len(req.files) > 0 && !c.useMultipartForm {
return errors.New("cannot send files with PostFields option")
}