Hi, we are looking for a way to execute the same shopifyQl query that fetches monthly sales totals in the newer graphql api.
We have something like this that returns monthly sales figures:
{
shopifyqlQuery(query: "FROM orders SHOW sum(gross_sales) AS monthly_gross_sales GROUP BY month SINCE '2024-11-01' UNTIL '2024-11-25'") {
__typename
... on TableResponse {
tableData {
unformattedData
rowData
}
}
}
}
But using the newer versions of the graphql api (now that shopifyql is sunsetted), we seem to only be able to return multiple orders at a time, not grouping them.
Is there a way to do this with the newer graphql api, for example grouping these values:
{
orders(first: 5, query: "processed_at:>=2024-11-01") {
nodes {
subtotalPrice
}
}
}