Hello,
I am running the following query request as a JSON request body. This seems to work for a smaller account with around 1800+ product variants, but returns everything for our larger account with 3000+ product variants. I would like for it to return only records for products updated after a certain date. I have tried multiple versions, including with and without the single quotation, and with and without the ProductsUpdatedAfter connection, but get the same result. Is this just returning everything in the same block of memory /disk ? If not, how can I resolve this?
Thank you,
– REQUEST BODY–
{ “query”: “query ProductsUpdatedAfter{ products(first: 250, query: "updated_at:>‘2025-04-28T00:00:01Z’", reverse: true , sortKey: UPDATED_AT){edges {node {variants(first: 250) {edges{ node {id title createdAt updatedAt inventoryPolicy sku product {id title publishedAt updatedAt} inventoryItem{ id createdAt tracked trackedEditable{locked reason} inventoryLevel(locationId:"gid://shopify/Location/LOCATIONID") {location {id} quantities(names: ["available"]){name quantity updatedAt} }}}}}} } pageInfo {startCursor endCursor hasNextPage}} }”}
Can you to the check the updated_at date on the returned data?
Your query looks right, maybe the products updated at date is recent?
Hi Taksh,
Thanks for the response. I’ve checked the product.updatedAt field and some as early as 04-2024 are coming in for that request.
1 Like
Hey @Edwin_Tembo,
I was testing your query here and it’s working for myself. I removed the reverse:true so that the first page would be the oldest and they are all after 2025-04-28.
I also added the query syntax debug headers and it appears to be parsing correctly.
"search": [
{
"path": [
"products"
],
"query": "updated_at:>'2025-04-28T00:00:01Z'",
"parsed": {
"field": "updated_at",
"range_gt": "2025-04-28T00:00:01Z"
}
}
]
One thing I do notice is that your query has a lot of different updatedAt fields included. Can you test a more simplified query just to double check if the issue you are seeing happens with that as well? Something like this to request only the productID and the updatedAt fields:
query ProductsUpdatedAfter {
products(
first: 250
query: "updated_at:>'2025-04-28T00:00:01Z'"
sortKey: UPDATED_AT
) {
edges {
node {
id
updatedAt
}
}
pageInfo {
startCursor
endCursor
hasNextPage
}
}
}
If the above doesn’t help unblock you, share the request id from your response headers and I’ll take a closer look.
Hey! Just checking to see how that additional troubleshooting worked out?