Skip to main content
Anchor to ShopifyqlQueryResponse

ShopifyqlQueryResponse

object

Requires read_reports access scope.

A response to a ShopifyQL query.

•[AnalyticsTarget!]!
non-null

A list of analytics targets that match the ShopifyQL query. For target gauge queries, returns the matching target if one exists. For COMPARE TO targets queries, returns matching targets for visualized metrics in VISUALIZE order. Returns an empty list when no targets match or the ShopifyQL query cannot be matched. Query parseErrors to detect invalid ShopifyQL.

•[String!]!
non-null

A list of parse errors, if parsing fails.

•ShopifyqlTableData

The result in a tabular format with column and row data.


Was this section helpful?

•query

Executes a ShopifyQL query to analyze store data and returns results in a tabular format.

The response includes column metadata with names, data types, and display names, along with the actual data rows. If the query contains syntax errors, then the response provides parse error messages instead of table data.

Read the ShopifyQL reference documentation for more information on how to write ShopifyQL queries.

Arguments

•String!
required

A ShopifyQL query string following the ShopifyQL syntax. Queries must include FROM to specify the data source (such as sales, orders, or customers) and SHOW to select metrics and dimensions. Example: FROM sales SHOW total_sales TIMESERIES month SINCE -12m.



Was this section helpful?