Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there,
I'm using the shopifyqlQuery GraphQL method to pull a custom dataset, and the response returned is:
{
"errors": [
{
"message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 87893aac-cc01-4e29-b5fc-031335da08e8 (include this in support requests).",
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"requestId": "87893aac-cc01-4e29-b5fc-031335da08e8"
}
}
]
}
Here is my complete GraphQL:
{
shopifyqlQuery(query: "from sales show day, orders, gross_sales, discounts, returns, net_sales, shipping, duties, additional_fees, taxes, total_sales group by day since -1y until today") {
__typename
... on TableResponse {
tableData {
rowData
columns {
name
dataType
displayName
}
}
}
parseErrors {
code
message
range {
start {
line
character
}
end {
line
character
}
}
}
}
}
I have Admin API access and I'm passing through all necessary scopes.
The API version I'm using is "Unstable" because that's the only one that allows me to use the above function (maybe this is the issue?).
I can pull other data just fine, like products for example.
Any ideas how to fix this? Any help would be greatly appreciated.
Solved! Go to the solution
This is an accepted solution.
I realized my own mistake. When grouping by day, you do not need day in the columns. Updated query that works is:
from sales show orders, gross_sales, discounts, returns, net_sales, shipping, duties, additional_fees, taxes, total_sales group by day since -1y until today
This is an accepted solution.
I realized my own mistake. When grouping by day, you do not need day in the columns. Updated query that works is:
from sales show orders, gross_sales, discounts, returns, net_sales, shipping, duties, additional_fees, taxes, total_sales group by day since -1y until today
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025