GetOperationMetrics
Top operations by usage/health for a graph over a time window, as compact CSV.
Columns: start timestamp, end exclusive timestamp, operation name, request count, request latency p50 ms, request latency p99 ms, request with error count.
Ranked by orderBy descending: default REQUEST_COUNT (busiest); REQUEST_WITH_ERROR_COUNT for most error-prone, REQUEST_LATENCY_P99_MS for slowest.
variantName scopes to one or more variants (omit for all).
clients scopes to one or more clients; omit clientVersion to match every version of that client, and use GetClientMetrics to discover the names a graph sees.
Keep the default resolution of ENTIRE_RANGE for totals and top-N, which gives one row per operation ranked over the whole window.
DAY/HOUR/MINUTE give one row per operation per bucket ranked within each bucket, so a window total then needs a per-operation sum plus a limit big enough to cover every bucket; too small a limit silently undercounts.
Only HOUR and MINUTE accept a to of now, so use them for bursts in the last 24 hours.
Avoid MONTH: it labels buckets by calendar month, not by the requested window.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"graphId": "<graphId>",
"from": "<from>",
"to": "<to>"
},
"name": "GetOperationMetrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The ending timestamp for the report. Must be in the format: 2025-01-01T08:00:00Z (ISO 8601). This timestamp cannot exceed your plan's operation-level data retention as defined in the Apollo GraphQL pricing page (https://www.apollographql.com/pricing). | |
| from | Yes | The starting timestamp for the report. Must be in the format: 2025-01-01T00:00:00Z (ISO 8601). This timestamp cannot exceed your plan's operation-level data retention as defined in the Apollo GraphQL pricing page (https://www.apollographql.com/pricing). | |
| limit | No | Maximum number of records to return (default: 100, max 10000). | |
| clients | No | ||
| graphId | Yes | ||
| orderBy | No | REQUEST_COUNT | |
| resolution | No | The resolution of the time groups for the report. This resolution will affect the range of times that can be used for the 'from' and 'to' timestamps: - For the MINUTE resolution, the total time between 'from' and 'to' must be no more than 1 day, and the 'from' time must be no earlier than 30 days ago. - For the HOUR resolution, the total time between 'from' and 'to' must be no more than 7 days, and the 'from' time must be no earlier than 90 days ago. - For the DAY, MONTH, and ENTIRE_RANGE resolutions, the 'from' time must be no earlier than 549 days ago (approx 18 months), and the 'to' time must be no later than 1 day ago. - These time ranges are further constrained by your plan's operation-level data retention as defined in the Apollo GraphQL pricing page (https://www.apollographql.com/pricing). If these criteria are not met, this will return a REQUEST_INVALID error. | ENTIRE_RANGE |
| variantName | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| errors | No | ||
| extensions | No |