Facing retrieve less document from the graphql query

Hi, everyone. I have been working with the admin GraphQL for quite some time, and recently I received a request to obtain the order data from the Shopify store in order to plot it on the analytic graph for one of the projects I am involved in. Now, the issue I am encountering is as follows: I am attempting to retrieve data within a specific time range, but I cannot get records from more than two months ago. I have done some exploration but have not found anything helpful. I would like to know if anyone has encountered this issue before.

You need Protected customer data access permission to get all orders instead of just last 60 days

1 Like

Thanks for the solution, @Gulam_Hussain_Quinn. I’ll get those permission sorted for the app and let you know if it doesn’t work.

I don’t think its the protected customer data. You need it for some data points but if you are not able to see data older than 60 days, then its because of read_all_orders

You need read_all_orders scope along with read_orders to read orders older than 60 days.
See: Shopify API access scopes

Hi, @geon Do I need to request for permission from the Shopify and wait for it to get approved?

Yes, read_all_orders is not available for dev apps. For prod apps you need give Shopify a good reason why you need this

Great, I requested the permission for read_all_orders on Friday. Now waiting for Shopify to approve the request.

1 Like