Order date filter with shopify bulk api is behaving inconsistently

Saptarshi
Shopify Partner
15 0 2

hello, there’s a bug in shopify’s graphql query because of which i’m getting inconsistent results, the order date filter seems to be behaving erratically with shopify bulk api request.

 

i’m using shopify’s bulk api to run this query to fetch all orders in last 7 days

{
  orders(
    query: "created_at:>=2022-09-23T00:00:00+0200 AND created_at:<2022-09-30T00:00:00+0200"
    sortKey: CREATED_AT
    reverse: true
  ) {
    edges {
      node {
        createdAt
        currentSubtotalLineItemsQuantity
        currentTotalPriceSet {
          shopMoney {
            amount
          }
        }
      }
    }
  }
}

i have a user who have had 1 order in last 7 days (on 28th September) but it’s not showing up in the results with this gql query

 

now if i change the query parameter to last 30 days, then it’s showing up (order with createdAt date 28th September) along with bunch of other orders

 

{
  orders(
    query: "created_at:>=2022-08-31T00:00:00+0200 AND created_at:<2022-09-30T00:00:00+0200"
    sortKey: CREATED_AT
    reverse: true
  ) {
    edges {
      node {
        createdAt
        currentSubtotalLineItemsQuantity
        currentTotalPriceSet {
          shopMoney {
            amount
          }
        }
      }
    }
  }
}

can anyone look into this please?

Reply 1 (1)

kevnob
Shopify Staff
11 3 3

Hey @Saptarshi - thanks for your post! 

 

I'm not sure using the bulk operations query is the most effective method for pulling 1 order unless I am missing something however, I tested both GraphQL calls on my test store outside of the bulk operation with similar date ranges and received the expected responses. 

 

We would be happy to dig in a little further for you if you could make an authenticated request through support. Could you please fill out the Report an Issue form found in the Partner Dashboard under the Support section? Any additional information you can provide around this issue would be very helpful! 

 

 

To learn more visit the Shopify Help Center or the Community Blog.