Article
Represents an article object with content, author, and comment information.
Type Definition
type Article {
seoDescription: String
seoTitle: String
seoKeywords: String
handle: String
headerImage: String
author: Author
id: Int
title: String
content: String
summary: String
comments: [Comment]
commentsCount: Int
blog: Blog
isPublished: Boolean
commentsAreEnabled: Boolean
commentsRequireAccount: Boolean
commentsRequireApproval: Boolean
accountOwner: Boolean
url: String
createdAt: String
updatedAt: String
}Fields
| Field | Type | Description |
|---|---|---|
| seoDescription | String | Returns description for search engines. |
| seoTitle | String | Returns title for search engines. |
| seoKeywords | String | Returns keywords for search engines. |
| handle | String | Retrieve a handle for this article. |
| headerImage | String | Retrieve the associated header image URL for this article. |
| author | Author | Returns information about the article’s author as an AuthorDrop. |
| id | Int | Get the identifier for this article. |
| title | String | Returns the title. |
| content | String | Get the content of this article. |
| summary | String | Returns the summary (max. 140 characters) for this article. |
| comments | [Comment] | List of published comments for this article. Empty if comments are disabled. |
| commentsCount | Int | Number of published comments for this article. |
| blog | Blog | The blog object this article belongs to. |
| isPublished | Boolean | Whether this article is published (unpublished articles are visible in design mode). |
| commentsAreEnabled | Boolean | Whether commenting is enabled for this article. |
| commentsRequireAccount | Boolean | Whether commenting requires a customer account. |
| commentsRequireApproval | Boolean | Whether comments require approval for this article. |
| accountOwner | Boolean | Returns true if the author is the owner of the store. |
| url | String | Returns the URL for this product group. |
| createdAt | String | Returns the timestamp when the article was published. |
| updatedAt | String | Returns the timestamp when the article was updated or modified. |
Relationships
The Article type represents a published or draft article within a blog. Each article belongs to a Blog and contains metadata for search engine optimization. Articles can have an associated Author and a collection of published Comment objects if commenting is enabled. The article’s SEO fields provide metadata for search engines, while the handle and URL fields provide accessible identifiers for the article.
Example
query {
article(id: 12345) {
id
title
content
summary
handle
url
seoTitle
seoDescription
seoKeywords
author {
name
}
blog {
title
}
comments {
id
body
}
commentsCount
isPublished
createdAt
updatedAt
}
}Implements
None