Hi @Brett!
I apologize for my delay in this
It seems to be related to the error you reported before, it is related to an error when calculating the complexity of the Query.
I will raise the priority on that ticket and will let you know as soon as I have an update about it.
Thanks again for the patience!
Tom
@tomasw Thanks for the info. I did try and do a very simplistic query with no sub-requests (no line items, no labels, etc.) and still got the same error.
Hi @tomasw. So I removed the fragment and used the full query I’d like to have, and got the same error. I should also point out that I’d prefer to use fragments as the same information can be requested with different filters and a fragment is the way to impose consistency between the two queries.
Request ID: 5f05c4c73125226866915dcb
GraphQL Query:
query($recordLimit:Int=5 $itemLimit:Int=10 $cursor:String="" $sort:String="created_date") {
shipments {
request_id
complexity
data(after:$cursor first:$recordLimit sort:$sort) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
legacy_id
order_id
user_id
warehouse_id
pending_shipment_id
address {
name
address1
address2
city
state
country
zip
phone
}
picked_up
created_date
line_items(first:$itemLimit) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
line_item_id
quantity
line_item {
sku
}
}
cursor
}
}
shipping_labels {
status
tracking_number
carrier
shipping_name
shipping_method
cost
address {
name
address1
address2
city
state
country
zip
phone
}
shipment_line_items(first:$itemLimit) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
line_item_id
quantity
line_item {
sku
}
}
cursor
}
}
}
order {
id
order_number
partner_order_id
shop_name
fulfillment_status
order_date
email
packing_note
}
}
cursor
}
}
}
}
Thanks for confirming that @brett
Thanks for those details, I’m seeing that error on our logs, I believe this one might be a different error related to the header of the request, but let me investigate a bit.
I do agree that Fragment should be possible without that kind of errors, we’ll keep pushing for that ticket to be solved soon.
Thanks again for the patience!
Tom
@tomasw No, I implemented work-around for malformed errors key returned in a response. This is refusing to return a result and is instead returning error code 22. Yes, it’s using the same fragment style query structure, but even in the other thread, I was still getting data back just with the extra errors key. Now I’m not getting any data back for a Shipments query.
Thanks for clarifying that @brett !
The error you are seeing is a timeout, it seems that results might be too much to filter them.
What about adding another filter to that?
@tomasw Thanks for that. So just so I understand: When I specify that I want the “first” or “last”, that restriction isn’t enough to limit the query because it’s limited to the first/last nafter the result is returned. So if I have a large dataset, I need to use filters to limit the returned result size.
I ask because I’m making a similarly complex query to retrieve order data, and that doesn’t require that I use additional filters to limit the scope of the data pool.
Example Orders Query: 5f171dd67e842de12d553940 Example Shipments Query: 5f171e824d23be27ff3b4c06
That is correct @brett!
For example, if you search for first:10 orders, then we query ALL orders and then just get the first 10, but if you instead say first:10 + date_from:2020-01-01 + date_to:2020-01-02 then we will just be looking for a day, and then getting the first 10, which will make this faster and more efficient