Authentication
Preview queries use apreview-token header instead of x-api-key:
Preview Query
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | String! | Yes | Preview link token |
version | Int | No | Specific component version (defaults to latest draft) |
Component Preview
Fetch a component preview (defaults to latest draft):Specific Version
Fetch a specific published version of a component:Content Preview
Fetch a content preview:Preview Types
ComponentPreview
| Field | Type | Description |
|---|---|---|
componentId | ID! | Component ID |
component | Component | Component data (null if exceeds 128KB) |
resolvedRef | ResolvedPackageRef! | Package IDs for caching |
ContentPreview
| Field | Type | Description |
|---|---|---|
contentId | ID! | Content ID |
content | Content | Content data (null if exceeds 128KB) |
resolvedRef | ResolvedPackageRef! | Package IDs for caching |
Error Handling
Invalid Token
Version Not Found
Preview Resource Deleted
Draft Package Handling
Draft packages use a special ID format:draft:{projectId}:{organizationId}
For real-time updates to previewed content, use the previewUpdated subscription.
