A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I am trying to create a report for use in my Custom App.
My ShopifyQL query is --
"FROM Sales SHOW week, product_id, product_title, pos_location_name, orders, net_quantity GROUP BY week ALL SINCE -30d UNTIL today ORDER BY week"
{
"errors": {
"shopify_ql": [
"parse error [0,0]: expected: SHOW, found: FROM"
]
}
}
{
"errors": {
"shopify_ql": [
"parse error [0,89]: expected: EOF, found: GROUP"
]
}
}
I'm also having this problem, even when trying queries that are given as examples in the Shopify documentation. Did you ever manage to get around this, or can anyone else offer any help?
The REST API supports ShopifyQL V1. The GraphQL supports ShopifyQL V2. The versions are similar but not compatible. In both the ordering of keywords is important. In V1 there's no "GROUP" keyword. The query you want for V1 is probably:
SHOW orders, net_quantity
OVER week
BY product_id, product_title, pos_location_name
FROM sales
SINCE -30d
UNTIL today
ORDER BY week
To learn more visit the Shopify Help Center or the Community Blog.
Hi, thank you for clarifying this!
In my case, I want to use the products dataset (ultimately I just want to be able to query for order/sales and filter by product collection). Using a query such as "SHOW sum(gross_sales) FROM products SINCE -30d UNTIL today" is accepted by the REST PUT, but when attempting to view the report in the Shopify Admin it gives the error "
That is odd. Try table `products_v2`.
To learn more visit the Shopify Help Center or the Community Blog.
Hi, same thing, unfortunately!