Only one store not returning bulk query results

crt_leinade
New Member
3 0 1

I need to be able to get all the orders from several different stores. The private app permissions are similar across the different stores.

The query below works for all the stores except for one. When I also run this in Shopify GraphIQL, I get a `COMPLETED` response, but `null` values for `url` or even `errorCode`

mutation {
  bulkOperationRunQuery(
   query: """
    {
      orders (query: "created_at:>='2019-01-01T00:00:00Z' AND created_at:<'2020-01-01T00:00:00Z'") {
        edges {
          node {
            id
            name
            <some other fields>
          }
        }
      }
    }
    """
  )  {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

 on GraphIQLon GraphIQLScreen Shot 2021-03-05 at 9.18.00 AM.png

 

Why could this be not working in just one store when all of the private apps have the same permissions and code?

0 Likes
_JCC_
Shopify Staff
Shopify Staff
113 16 21

Hey @crt_leinade ,

Is it possible the store in question doesn't have any results being returned for the query filter provided? Removing the bulk operation, does the order query on its own return any results?

If on it's own the order query does return results, could you could provide the x-request-id from the response headers of the currentBulkOperation query, and I'll have a look at our logs.

Regards,

John

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
crt_leinade
New Member
3 0 1

Hi @_JCC_ - querying them returns results. We're also seeing that there are orders from 2015-2019.

 

I did observe that querying orders for 2014 returns the same results (null error and results). It's just unexpected for those that came in much later.

 

The X-Request-ID for my most recent currentBulkOperation query was 8e881b11-8a78-4e9b-81d5-1511e8c8dc92. Appreciate you looking into it.

0 Likes
_JCC_
Shopify Staff
Shopify Staff
113 16 21

Hey @crt_leinade,

Have you tried using processed_at as a query filter? In the Shopify admin, the orders page uses processed_at when filtering by date.

If there was ever any type of data migration from another platform to Shopify, the created_at field might not yield the results you expect. Generally the processed_at and created_at are very close in date and time (within seconds). One exception would be if some type of data migration was performed where the created_at field would represent the date and time the order was migrated to Shopify, and the processed_at likely representing the date and time of the original order.

Hope this helps, if you have any other questions let me know.

Regards,

John

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes