Credit Limit Concerns

Hi,

Running into credit limits with this query, which is necessary to determine ready to ship status.

This is just for one SKU, so pulling all of our orders (there’s millions) would be impossible.

I understand the credit limit cannot be increased. Are there alternative ways to write the below query to stay within threshold and still receive all information in a reasonable time frame?

query {
  orders(sku: "838530984") {
    data {
      edges {
        node {
          id
          order_number
          shop_name
          fulfillment_status
          partner_order_id
          holds {
            fraud_hold
            address_hold
            shipping_method_hold
            operator_hold
            payment_hold
          }
          line_items {
            edges {
              node {
                backorder_quantity
                quantity_pending_fulfillment
                quantity_shipped
                quantity_allocated
              }
            }
          }
        }
      }
    }
  }
}

Thanks!

HI @Devin_Mabra!
You could include first:10 for line items, something like this:

line_items(first: 10) {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges {
      node {
        backorder_quantity
        quantity_pending_fulfillment
        quantity_shipped
        quantity_allocated
      }
    }
  }
}

Because if you don’t include the first:10 it will assume 100 by default, making the query more complex. And by including the pageInfo you can tell if there are more line items to that order