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 don’t need an x-api-key header. The token argument of the preview query authorizes the request.

Preview Query

Parameters

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

ContentPreview

Error Handling

Invalid Token

Version Not Found

Previewed Content Not Found

Draft Package Handling

Draft packages use a special ID format: draft:{projectId}:{organizationId}
For real-time updates to previewed content, use the previewUpdated subscription.