diff --git a/graphql/client.go b/graphql/client.go index dbb827e..3481732 100644 --- a/graphql/client.go +++ b/graphql/client.go @@ -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{},