Skip to main content
query

Requires read_reports access scope. Also: Level 2 access to Customer data including name, address, phone, and email fields. Please refer to protected customer data requirements.

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.

•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?

Anchor to ShopifyqlQueryResponseShopifyqlQueryResponse
•ShopifyqlQueryResponse

A response to a ShopifyQL query.

•[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?