report
Returns a Report for a given report type or a previously obtained Report.id.
You must supply exactly one of id or type; providing neither is an error. When both are supplied, id takes precedence and type is ignored.
The returned Report is navigated functionally: operations such as sorting, filtering, or
toggling a column do not use mutations — they are fields on Report itself (e.g.
ReportColumn.sortedAscending) that each return a new Report with the requested change
applied. To bookmark or share any configuration, read Report.id from the response and pass
that value back to this field via the id argument to restore the exact same view.
Example — start from a report type:
query GetReport($type: String!) { report(type: $type, first: 50) { id lines { cells { value } } } }query GetReport($type: String!) { report(type: $type, first: 50) { id lines { cells { value } } } }
Example — restore a previously bookmarked configuration:
query RestoreReport($id: ID!) { report(id: $id) { id lines { cells { value } } } }query RestoreReport($id: ID!) { report(id: $id) { id lines { cells { value } } } }
Arguments
| Argument | Description | Type |
|---|---|---|
| columns | Metric keys to include as columns; overrides the default column set for the type or saved view. Obtain valid metric keys from | [ String! ] |
| first | Maximum number of rows to return (page size). Defaults to 100 when omitted. | Int |
| id | The Read | ID |
| locale | Locale for localized labels in the returned report (e.g. column names, filter labels). | Locale |
| offset | Selects a page of rows; pass a multiple of Values that are not a multiple of | Int |
| sort | Sort order; each entry is a metric key and direction. Entries with unknown keys or non-sortable metrics (see | [ SortInput! ] |
| rangeFilters | Numeric range filters to apply; each entry specifies a metric key and optional min/max bounds. Entries with unknown metric keys are silently ignored rather than causing an error. | [ RangeReportFilterInput! ] |
| wildcardFilters | Text search filters to apply; each entry specifies a metric key and a search string. Entries with unknown metric keys are silently ignored rather than causing an error. | [ WildcardReportFilterInput! ] |
| type | A report type key such as | String |
Type
This field resolves to Report, which has the following fields:
| Field | Description | Type |
|---|---|---|
aggregationOptions | The grouping dimensions available for this report. | [ ReportAggregationOption ] |
columns | The keys of the columns currently in the report. Deprecated — use `columnsV2` instead. | [ String ] |
columnsV2 | The columns currently included in the report, in display order. | [ ReportColumn ] |
filter | Returns the filter identified by `ReportFilter.key`, or null if no filter with that key exists for this report. | ReportFilter |
filters | All filters available for this report, whether or not they are currently active. | [ ReportFilter ] |
id | An opaque identifier that encodes the complete report configuration — type, columns, filters, sorting, and active aggregations. | ID! |
lines | The data rows for the current page. Each `ReportLine` contains one cell per column in the same order as `columnsV2`. | [ ReportLine ] |
metricConnections | All available metrics paired with their current column state. | [ ReportMetricConnection ] |
metrics | Flat list of all metrics available for this report type. | [ ReportMetric ] |
numberOfLines | The total number of rows matching the current filters, regardless of pagination. | Int |
sorting | The sort orders currently applied to the report. Each entry names a metric key and a direction. | [ ReportSorting ] |
summaries | One summary value per column, in the same order as `columnsV2`. | [ String ] |
type | The report type, such as `"sales"` or `"events"`. The type determines which metrics are available and how rows are defined. | ReportType |
withoutAggregations | The same report with all grouping removed, returning to individual row-level data. | Report |