Skip to content

Cms

CmsApi

Methods

getCmsContent()

getCmsContent<T>(request): Promise<object>
Type Parameters
Type Parameter
T
Parameters
ParameterType
requestobject
request.cacheTimeout?number
request.categorystring
request.endCursor?string
request.filter?CmsFilter[]
request.first?number
request.last?number
request.slug?string
request.startCursor?string
Returns

Promise<object>

NameType
dataT[]
pageInfoPageInfo

getSingleCmsContent()

getSingleCmsContent<T>(request): Promise<undefined | T>
Type Parameters
Type Parameter
T
Parameters
ParameterType
requestobject
request.cacheTimeout?number
request.categorystring
request.filter?CmsFilter[]
request.slug?string
request.startCursor?string
Returns

Promise<undefined | T>


Article

type Article: object;

Type declaration

NameTypeDescription
authorArticleAuthor-
blogBlog-
bodystringThe content of the article, complete with HTML formatting.
contentstringStripped content of the article, single line with HTML tags removed.
excerptstringStripped excerpt of the article, single line with HTML tags removed.
excerptHtmlstringThe excerpt of the article, complete with HTML formatting.
handlestringA human-friendly unique string for the Article automatically generated from its title.
idstringA globally-unique ID.
imageImageThe image associated with the article.
onlineStoreUrlstringReturns a metafield found by namespace and key.
publishedAtstringThe date and time when the article was published.
tagsstring[]A categorization that a article can be tagged with.
titlestringThe article’s name.
trackingParametersstringA URL parameters to be added to a page URL when it is linked from a GraphQL result. This allows for tracking the origin of the traffic.

ArticleAuthor

type ArticleAuthor: object;

The author of an article.

Type declaration

NameTypeDescription
biostringThe author’s bio.
emailstringThe author’s email.
firstNamestringThe author’s first name.
lastNamestringThe author’s last name.
namestringThe author’s full name.

Blog

type Blog: object;

Type declaration

NameTypeDescription
articleByHandleArticleFind an article by its handle.
authorsArticleAuthor[]The authors who have contributed to the blog.
handlestringA human-friendly unique string for the Blog automatically generated from its title.
idstringA globally-unique ID.
onlineStoreUrlstringThe URL used for viewing the resource on the shop’s Online Store. Returns null if the resource is currently not published to the Online Store sales channel.
titlestringThe blogs’s title.

BlogQuery

type BlogQuery: object;

Type declaration

NameType
blogPick<Blog, "title"> & object

BlogsQuery

type BlogsQuery: object;

Type declaration

NameType
blogsobject
blogs.nodesPick<Blog, "title" | "handle"> & object[]
blogs.pageInfoPageInfo

CmsFilter

type CmsFilter: object;

Type declaration

NameType
fieldstring
operatorCmsFilterOperator
valueany

CmsFilterOperator

type CmsFilterOperator:
| "eq"
| "ne"
| "gt"
| "ge"
| "lt"
| "le"
| "fts"
| "in";

The filter operator.


Page

type Page: object;

Type declaration

NameTypeDescription
bodySummarystringSummary of the page body.
contentstringThe description of the page, complete with HTML formatting.
createdAtstringThe timestamp of the page creation.
handlestringA human-friendly unique string for the page automatically generated from its title.
idstringA globally-unique ID.
onlineStoreUrlstring-
titlestringThe title of the page.
trackingParametersstringA URL parameters to be added to a page URL when it is linked from a GraphQL result. This allows for tracking the origin of the traffic.
updatedAtstringThe timestamp of the latest page update.