Issue during testing GraphQL queris

Hello team,
We faced the following issue during testing our GraphQL queris,

{
“errors”: [
{
“code”: 30,
“message”: “There are not enough credits to perfom the requested operation, which requires 1001 credits, but the are only 435 left. In 38 seconds you will have enough credits to perform the operation”,
“operation”: “orders”,
“request_id”: “5ea17e9d3cc8cd0f080397fd”,
“required_credits”: 1001,
“remaining_credits”: 435,
“time_remaining”: “38 seconds”
}
],
“data”: {
“orders”: null
}
}

We are going to use this query from automation business process which should makes many requests. Seems because of this issue our BP will failed after few requests because of this issue.
Is where any workaround to solve this issue and not get those error?

Hi @Kateryna.Maksymiuk!
So this is the Query you are sending:

{
  orders {
    request_id
    complexity
    data(first: 100) {
      edges {
        node {
          id
          order_number
          line_items(first: 10) {
            edges {
              node {
                id
                sku
                quantity
                product_name
                created_at
                updated_at
              }
            }
          }
        }
      }
    }
  }
}

So maybe you could get the first 50 Orders and set a time out between requests of 30 seconds to then fetch the next 50? Or maybe fetching fewer line items.
The complexity of this query is based on fetching 100 orders with 10 line items each + a default 1 (100*10+1)
Will you be running this periodically? You could also use filters like order_date_from or order_date_to
Let me know if that doesn’t help,
Thanks!
Tom