Watch for real-time updates to previewed components or content via a preview token.
Subscriptions are only useful for draft components and unpublished content, as published versions are immutable and will never change.
Subscription
Parameters
| Parameter | Type | Required | Description |
|---|
token | String! | Yes | Preview link token |
Authentication
Use previewToken in connection params instead of x-api-key:
Response: PreviewUpdate
| Field | Type | Description |
|---|
preview | PreviewResult! | ComponentPreview or ContentPreview |
action | String! | ”UPDATED” or “DELETED” |
timestamp | DateTime! | When the update occurred |
ComponentPreview
| Field | Type | Description |
|---|
componentId | ID! | Component ID |
componentName | String! | Component name for display/recents |
component | Component | Component data (null if exceeds 100KB) |
resolvedRef | ResolvedPackageRef! | Package IDs for caching |
ContentPreview
| Field | Type | Description |
|---|
contentId | ID! | Content ID |
contentName | String! | Content name for display/recents |
contentTypeName | String! | Content type name for display/recents |
content | Content | Content data (null if exceeds 100KB) |
resolvedRef | ResolvedPackageRef! | Package IDs for caching |
Example
Variables
Component Update Payload
Content Update Payload
Client Implementation
Handling Large Payloads
When data exceeds 100KB, the component or content field will be null: