Skip to main content

About the GraphQL Admin API

The GraphQL Admin API runs a ShopifyQL query from your app. You send a ShopifyQL query as a string through the shopifyqlQuery field and get back structured results to render on a dashboard or in an email. Use it when you're building an app and want store analytics inside it, such as a total, a trend, or a ranking across many records. To read or change a single order, customer, or product, query the GraphQL Admin API objects directly instead. It's the same query language you prototype in the Shopify admin, running unchanged from code.


A query names a dataset and the metrics to return with FROM and SHOW. Your app sends it through the shopifyqlQuery field and reads back a tableData response of typed columns and rows. The response is rendering-agnostic, so the same columns and rows can drive a table, a chart, or a single headline metric.

GraphQL query

{
shopifyqlQuery(
query: "FROM sales SHOW total_sales, orders TIMESERIES day SINCE -7d ORDER BY day ASC"
) {
tableData {
columns {
name
dataType
displayName
}
rows
}
parseErrors
}
}

Running shopifyqlQuery requires the read_reports access scope, Level 2 access to protected customer data, and GraphQL Admin API version 2025-10 or higher. Protected customer data approval can take time, so request it early.


Anchor to Developer tools and resourcesDeveloper tools and resources



Was this page helpful?