GraphQL - Query by TIME

I’m trying to get all orders AFTER a certain updated_at time.

For example, I am doing this query:

query: “updated_at:>2024-12-17T20:18:20Z”

Yes my payload is still including this order:

updatedAt": “2024-12-17T20:17:20Z”

I have tried a lot of different formats.
2024-12-17T20-18-20Z
2024-12-17T20:18:20:Z
2024-12-17T20:18:20-6:00
2024-12-17T20:18:20

etc. Sometimes it filters vaguely. I managed to get it from 7 orders to 4. But the logic seems almost nonsensical.
It seems to factor in the Date but not the Time.

Has anyone had issues with the time, and had any luck with a resolution?

Thank you.

I finally figured this out after some frustrating hours wasted.

You need to wrap the datetime in single quotes.

So "updated_at:>‘2024-12-17T20:18:20Z’ " not "updated_at:>2024-12-17T20:18:20Z "

Of course, this small but significant detail is omitted from the documentation here, including the working example:

https://shopify.dev/docs/api/admin-graphql/2025-01/queries/orders

3 Likes