A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We had a working shopifyql query but it stopped working today and is throwing an error: Syntax not recognized
What could have happened? Was there a change with how queries are done cause they were working previously but now is not:
below is our query:
graphQLquery ="""{ shopifyqlQuery(query: "from sales show net_quantity by product_title, hour since yesterday until today order by hour") { __typename ... on TableResponse { tableData { rowData columns { name dataType displayName } } } parseErrors { code message range { start { line character } end { line character } } } } }"""
and here is the error:
Hi @Herald_FF!
The error is talking about the first part of the query,
"from sales show net_quantity by product_title"
That "by" is out of place. You'll need to use GROUP BY or ORDER BY, and not just "by".
Take a look at how to use ShopifyQL in your queries in the dev docs for more info!
Mike M (mikerowave) | API 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