add QueryRaw to graphql client
This commit is contained in:
parent
69254ce05b
commit
2f98cf2f2c
@ -80,6 +80,21 @@ func (c *Client) Query(
|
||||
return c.gql.Query(ctx, q, variables, options...)
|
||||
}
|
||||
|
||||
func (c *Client) QueryRaw(
|
||||
ctx context.Context,
|
||||
q interface{},
|
||||
variables interface{},
|
||||
options ...graphql.Option,
|
||||
) ([]byte, error) {
|
||||
err := c.rl.Wait(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "waiting for rate limit")
|
||||
}
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
return c.gql.QueryRaw(ctx, q, variables, options...)
|
||||
}
|
||||
|
||||
func (c *Client) Mutate(
|
||||
ctx context.Context,
|
||||
q interface{},
|
||||
|
Loading…
Reference in New Issue
Block a user