Order queries for 32 or less orders never complete

I’ve encountered a weird issue in the past week. I’m building a query for orders and wanted to query a small amount of orders due to a handful of connections I want to make. It seems I can’t query for any number of orders less than 33. A request for 33, 50, 100, etc. orders completes in under a second. Queries for 32, 25, 15, 10, etc. never finish. I’ve seen request time run for over 300 seconds and still not receive a result.

I am making request from an Insomnia client.

Query I’m using (without connections)

query {
	orders {
		complexity
		data(first: 33) {
			edges {
				node {
					address_is_business
					billing_address {
						address1
						address2
						city
						company
						country
						country_code
						email
						first_name
						last_name
						phone
						state
						state_code
						zip
					}
					box_name
					email
					fulfillment_status
					id
					insurance
					order_date
					order_history {
						information
					}
					order_number
					packing_note
					partner_order_id
					profile
					require_signature
					shipping_address {
						address1
						address2
						city
						company
						country
						country_code
						email
						first_name
						last_name
						phone
						state
						state_code
						zip
					}
					shop_name
					source
					subtotal
					total_price
				}
			}
		}
	}
}

You have a strange one, What I find is that its pulling the first orders back when you first started with shiphero. I’ve always found that it takes a while for older orders. now if you put in a date range, it may be better at populating. If I don’t have the dates, mine don’t finish, even if I have the 33,50 or 100

~Justin

Hello @jknechtv!

I already have our engineering team aware of this issue. I’ll add your example to the case ticket as well.

Just to confirm, are you getting an HTTP 504 timeout error?

Kind regards,
TomasFD

Hey Tom, I actually haven’t bothered to let it run to time out so the request never returned. I.e. I got no HTTP status code. As mentioned above, I had at least 1 request reach over 300 seconds that still hadn’t returned

Hello,

I have a very very similar issue on the order_history query. If I dont provide anything it gives me an internal server error. If I try to query exactly 1 matching result it never finishes the request.

Hello Tony,

Welcome to our community!

Can you confirm if by “I don’t provide anything” you mean you don’t even provide the order_id of which you want to retrieve the history?

Have a nice day!
TomasFD

correct. If I don’t provide an order_id or order_number or such it just results in an internal error. If I provide a uniquely identifying argument it queries indefinitely without ever responding meaning I have to manually abort the request.

EDIT: correction to my response. I just rechecked with both order_id and order_number (as we mainly use order_number) and it seems not providing these does not result in an error anymore.
The only issue left is that querying for a specific value never finishes the request.

Hi @tony

That query requires to send at least order_id or order_number.

Can you share with me an example of one of those cases that never finishes? Is it a timeout or do you have access to a request_id to share with me?

Have a nice day!

Hey so the queries we noticed this with all look like this (exact order number redacted but format kept):

query Order_history {
    order_history(order_number: "US01234A") {
        data {
            edges {
                node {
                    id
                }
            }
        }
    }
}

This will never finish for some reason.

A query to orders finishes as expected when just giving the order_number like so:

query Order {
    orders(order_number: "US01234A") {
        data {
            edges {
                node {
                    id
                }
            }
        }
    }
}

The order_history query does finish if we don’t access data but for example complexity.

Hi @tony!

We pushed a fix for this scenario.

Can you confirm it is working now for you?

Best,
TomasFD

Hey tomas

it works as expected now.

Hey @tony
That is great news. Thanks for taking the time to check!