Cloudflare/analytics
@swamp/cloudflare/analyticsv2026.07.27.1
01README
Cloudflare GraphQL Analytics models
02Release Notes
- Added: graphql_analytics
03Models
@swamp/cloudflare/analytics/graphql-analyticsv2026.07.27.1graphql_analytics.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn query(dataset: string, dimensions: array, sumFields?: array, avgFields?: array, datetime_geq: string, datetime_lt: string, filters?: record, orderBy?: array, limit?: number, name?: string)
Query a Cloudflare zone-level adaptive analytics dataset.
| Argument | Type | Description |
|---|---|---|
| dataset | string | GraphQL Analytics dataset to query (e.g. httpRequestsAdaptiveGroups, |
| dimensions | array | Dimensions to group by. Available dimensions depend on the dataset. |
| sumFields? | array | Fields to aggregate with sum (e.g. edgeResponseBytes, visits). |
| avgFields? | array | Fields to aggregate with avg (e.g. sampleInterval). |
| datetime_geq | string | Start of time range, inclusive (ISO 8601, e.g. 2026-07-01T00:00:00Z) |
| datetime_lt | string | End of time range, exclusive (ISO 8601, e.g. 2026-07-02T00:00:00Z) |
| filters? | record | Additional filter fields beyond the datetime range (e.g. { clientRequestHTTPHost: "example.com", edgeResponseStatus: 200 }) |
| orderBy? | array | Order-by fields (e.g. ["count_DESC", "sum_edgeResponseBytes_DESC"]) |
| limit? | number | Maximum number of grouped rows to return (default: 100) |
| name? | string | Instance name for the result artifact (default: "current") |
fn sync(identifier?: string)
Re-run the analytics query using the stored parameters
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Instance name of the result to refresh (default: "current") |
Resources
result(infinite)— GraphQL Analytics query result
04Stats
A
100 / 100
Downloads
0
Archive size
9.4 KB
Verified by Swamp
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
05Platforms
06Labels