Skip to main content
Preview queries allow accessing components and content via a shareable token without requiring an API key. This enables sharing draft work with stakeholders, testing components in isolation, and previewing unpublished content.

Authentication

Preview queries use a preview-token header instead of x-api-key:

Preview Query

Parameters

ParameterTypeRequiredDescription
tokenString!YesPreview link token
versionIntNoSpecific component version (defaults to latest draft)

Component Preview

Fetch a component preview (defaults to latest draft):
Response:

Specific Version

Fetch a specific published version of a component:
Variables:

Content Preview

Fetch a content preview:

Preview Types

ComponentPreview

FieldTypeDescription
componentIdID!Component ID
componentNameString!Component name for display/recents
componentComponentComponent data (null if exceeds 100KB)
resolvedRefResolvedPackageRef!Package IDs for caching

ContentPreview

FieldTypeDescription
contentIdID!Content ID
contentNameString!Content name for display/recents
contentTypeNameString!Content type name for display/recents
contentContentContent data (null if exceeds 100KB)
resolvedRefResolvedPackageRef!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.