Discussing APIs and development related to customers, discounts, and order management.
Here's my query:
{ orders(first:12, query: "created_at:2023-07-28") { edges { node { id name displayFulfillmentStatus displayFinancialStatus confirmed } } } }
And the response:
{ "node": { "id": "gid://shopify/Order/***", "name": "#10517", "displayFulfillmentStatus": "UNFULFILLED", "displayFinancialStatus": "PAID", "confirmed": true } }, { "node": { "id": "gid://shopify/Order/***", "name": "#10518", "displayFulfillmentStatus": "UNFULFILLED", "displayFinancialStatus": "PAID", "confirmed": true } }, { "node": { "id": "gid://shopify/Order/***", "name": "#10519", "displayFulfillmentStatus": "UNFULFILLED", "displayFinancialStatus": "PAID", "confirmed": true } },
If I specify that I just want unfulfilled orders, i.e.
orders(first:12, query: "created_at:2023-07-28,fulfillment_status:unfulfilled")
Then order 10518 gets left out, despite being an unfulfilled order. There's nothing special about this order - it's not a local pickup one or POS order.
The same thing also happens on the REST API (i.e. using orders.json).
Does anyone have any ideas what's happening? It looks like a bug with Shopify.
Hey @fredhatt
Have you tried including the time / timezone details? E.g. created_at:'2020-10-21T23:39:20Z'
Scott | Developer Advocate @ Shopify
Hi @fredhatt 👋
Since date strings are ordinal, specifying the date without the time makes the query ambiguous. To query all orders created over the entire day (2023-07-28), it's best to pass a time interval: "created_at:>2023-07-28, created_at:<2023-07-29, fulfillment_status:unfulfilled"
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi there,
Thanks for the responses. I've tried both these proposals and neither of them fix the issue however.
I should have noted that the issue persists even without specifying "created_at" at all - I actually just included that query to isolate the order that was disppearing, as it's some time in the past now.
Furthermore this issue is not isolated to the graphQL API, and also occurs with the REST API for this order (and one other, that I know about).
Hey @fredhatt
Can you please DM me store details + example queries so I can investigate on this end.
Scott | Developer Advocate @ Shopify