Does shopifyqlQuery include access to all order data?

Does the new shopifyqlQuery endpoint also have access to order data past 60 days?

In the past you needed to apply for the “Read all orders” scope to have access to all orders.

Thanks,

Tom

1 Like

Hi @tdavies,

I’ve looked into this a bit, and it does look like the ShopifyQLQuery does currently return orders older than 60 days, even if the app does not have the read_all_orders scope.

I confirmed this on my test store, with the following ShopifyQL query returning the orders older than 60 days, but the following orders Admin API query did not return orders older than 60 days as expected.

Does return orders older than 60 days:

{
   shopifyqlQuery(query: 
    "
      FROM sales
      SHOW order_id, day, total_sales
      GROUP BY order_id, day
      SINCE -365d
      UNTIL -60d
      ORDER BY day DESC
    "
  ) {
    tableData {
      columns {
        name
        dataType
        displayName
      }
      rows
    }
    parseErrors
  }
    
    
    orders(first:10, query:"created_at:<2025-10-21"){
      nodes{
        id
        createdAt
      }
    }
}

Does not return orders older than 60 days:

orders(first:10, query:"created_at:<2025-10-21"){
      nodes{
        id
        createdAt
      }
    }

At this time I’m unsure if this is expected behaviour or not, and I will be discussing this with our developers further to confirm the behaviour here. I will update you further as soon as I have more information on the expected behaviour here!

Thanks @Kellan-Shopify for confirming the behavior.

Hopefully that is the way it will continue to work :slight_smile: Otherwise, the read_reports scope would be confusing to use if it triggered additional scopes depending on what is queried.

I look forward to your reply on if this is the expected behavior.

Hey @tdavies,

I’ve discussed this further with our developers internally, and they have confirmed that this is expected behaviour for now. The read_reports scope does give access to all data in the analytics platform, including orders older than 60 days, even if the app does not have the read_all_orders scope.

However, this may still be subject to change in the future, and you should definitely keep an eye on our Shopify.dev Changelog for any relevant changes to this behaviour.

Great thanks for confirming this @Kellan-Shopify. Much appreciated.

1 Like