CmsApi
Methods
getCmsContent()
getCmsContent < T >(request): Promise < object >
Type Parameters
Parameters
Parameter Type request
object
request.cacheTimeout
?number
request.category
string
request.endCursor
?string
request.filter
?CmsFilter
[]request.first
?number
request.last
?number
request.slug
?string
request.startCursor
?string
Returns
Promise
<object
>
getSingleCmsContent()
getSingleCmsContent < T >(request): Promise < undefined | T >
Type Parameters
Parameters
Parameter Type request
object
request.cacheTimeout
?number
request.category
string
request.filter
?CmsFilter
[]request.slug
?string
request.startCursor
?string
Returns
Promise
<undefined
| T
>
Article
Type declaration
Name Type Description author
ArticleAuthor
- blog
Blog
- body
string
The content of the article, complete with HTML formatting. content
string
Stripped content of the article, single line with HTML tags removed. excerpt
string
Stripped excerpt of the article, single line with HTML tags removed. excerptHtml
string
The excerpt of the article, complete with HTML formatting. handle
string
A human-friendly unique string for the Article automatically generated from its title. id
string
A globally-unique ID. image
Image
The image associated with the article. onlineStoreUrl
string
Returns a metafield found by namespace and key. publishedAt
string
The date and time when the article was published. tags
string
[]A categorization that a article can be tagged with. title
string
The article’s name. trackingParameters
string
A 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
Name Type Description bio
string
The author’s bio. email
string
The author’s email. firstName
string
The author’s first name. lastName
string
The author’s last name. name
string
The author’s full name.
Blog
Type declaration
Name Type Description articleByHandle
Article
Find an article by its handle. authors
ArticleAuthor
[]The authors who have contributed to the blog. handle
string
A human-friendly unique string for the Blog automatically generated from its title. id
string
A globally-unique ID. onlineStoreUrl
string
The 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. title
string
The blogs’s title.
BlogQuery
Type declaration
Name Type blog
Pick
<Blog
, "title"
> & object
BlogsQuery
Type declaration
Name Type blogs
object
blogs.nodes
Pick
<Blog
, "title"
| "handle"
> & object
[]blogs.pageInfo
PageInfo
CmsFilter
Type declaration
CmsFilterOperator
The filter operator.
Page
Type declaration
Name Type Description bodySummary
string
Summary of the page body. content
string
The description of the page, complete with HTML formatting. createdAt
string
The timestamp of the page creation. handle
string
A human-friendly unique string for the page automatically generated from its title. id
string
A globally-unique ID. onlineStoreUrl
string
- title
string
The title of the page. trackingParameters
string
A 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. updatedAt
string
The timestamp of the latest page update.