I’m using ShopifyQL via the GraphQL Admin API to pull time-bound spend for specific customers:
GraphQL
FROM sales
SHOW orders, total_sales
WHERE customer_email = 'customer@example.com'
GROUP BY customer_name, customer_email
SINCE -30d UNTIL today
ORDER BY total_sales DESC
LIMIT 1
Before scaling this for custom analytics, I need clarity on a few technical behaviors from anyone with production experience:
-
Data Latency: How quickly do new orders reflect in this dataset? Are we talking seconds, minutes, or hours?
-
Gross vs. Net:
total_salesreturns the Gross amount (including shipping/taxes). Is there a clean way to isolate Net product revenue using this dataset? -
Refund Attribution: If an order is placed inside the queried time window, but refunded outside of it, does
total_salesstill decrement properly? -
Rate Limits: Since this is an on-the-fly analytical query, are there severe rate-limiting penalties for running it frequently across different emails?
-
The Gotchas: Has anyone run into undocumented limitations, weird edge cases, or generally had a bad experience relying on this API at scale?
Any insights or war stories are appreciated. Thanks!