contentSnippet
Get a specific content snippet by key. These snippets are reusable content blocks that can be used across different pages.
Arguments
| Argument | Type | Description |
|---|---|---|
version | ContentVersionType | |
previewId | String | |
key | String! |
Returns
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier for the content snippet. |
key | String! | Key for identifying the content snippet. |
content | [Block!] | Content for the snippet. |
Example
query ContentSnippet( $version: ContentVersionType $previewId: String $key: String!) { contentSnippet(version: $version, previewId: $previewId, key: $key) { id key content { __typename ... on RichText { id document } ... on ArticleList { id anchor audience title } ... on BrandList { id anchor audience title } } }}{ "version": "DRAFT", "previewId": "Example", "key": "Example"}{ "data": { "contentSnippet": { "id": "id-1", "key": "Example", "content": [ { "__typename": "RichText", "id": "id-1", "document": {} } ] } }}The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-content-blocks:
ContentBlocksGetContentSnippet

