messages
The store's fixed system copy, such as the text for an empty cart. Null where the store has no messages entry.
Arguments
| Argument | Type | Description |
|---|---|---|
version | ContentVersionType | |
previewId | String |
Returns
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier for the messages. |
cartEmpty | RichText | Shown in a cart without line items. |
searchEmpty | RichText | Shown when a search finds nothing. |
notFound | RichText | Shown on the page for a path nothing answers. |
Example
query Messages($version: ContentVersionType, $previewId: String) { messages(version: $version, previewId: $previewId) { id cartEmpty { id document } searchEmpty { id document } notFound { id document } }}{ "version": "DRAFT", "previewId": "Example"}{ "data": { "messages": { "id": "id-1", "cartEmpty": { "id": "id-1", "document": {} }, "searchEmpty": { "id": "id-1", "document": {} }, "notFound": { "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:
ContentBlocksMessages

