How to send ShopifyQL query to Shopify GraphQL Analytics API ? My query doesn't work

How to send ShopifyQL query to Shopify GraphQL Analytics API ? My query doesn't work

seymur_crsp
Shopify Partner
67 4 10

Helllo. This is the query I'm sending to Shopify GrapgQL API:

 

 

query shopifyqlQuery($query: String!){
  shopifyqlQuery(query: $query) {
    parseErrors {
      code
      message
    }
    tableData {
      columns {
        comparedTo
        dataType
        displayName
        name
      }
      rowData
      unformattedData
    }
  }
}

 


And this is the ShopifyQL query I pass to it:

 

`
FROM products
VISUALIZE sum(net_sales) AS product_sales
TYPE BAR
GROUP BY product_title
SINCE last_month UNTIL yesterday
ORDER BY product_sales DESC
LIMIT 5
`

 


I get this error from the server:
"GraphqlQueryError: Internal error. Looks like something went wrong on our end"

I don't belive it's something wrong on @Shopify 's end, as it would be very unlikely. What am I doing wrong ?


Replies 0 (0)