Skip to Content

Article

Represents an article object with content, author, and comment information. Articles are typically published on blogs and can include SEO metadata, author information, and reader comments.

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 metafields: [Metafield]! metafield: Metafield }

Fields

FieldTypeDescription
seoDescriptionStringReturns description for search engines.
seoTitleStringReturns title for search engines.
seoKeywordsStringReturns keywords for search engines.
handleStringRetrieve a handle for this article.
headerImageStringRetrieve the associated header image URL for this article.
authorAuthorReturns information about the article’s author as an AuthorDrop.
idIntGet the identifier for this article.
titleStringReturns the title.
contentStringGet the content of this article.
summaryStringReturns the summary (max. 140 characters) for this article.
comments[Comment]List of published comments for this article. Empty if comments are disabled.
commentsCountIntNumber of published comments for this article.
blogBlogThe blog object this article belongs to.
isPublishedBooleanWhether this article is published (unpublished articles are visible in design mode).
commentsAreEnabledBooleanWhether commenting is enabled for this article.
commentsRequireAccountBooleanWhether commenting requires a customer account.
commentsRequireApprovalBooleanWhether comments require approval for this article.
accountOwnerBooleanReturns true if the author is the owner of the store.
urlStringReturns the URL for this product group.
createdAtStringReturns the timestamp when the article was published.
updatedAtStringReturns the timestamp when the article was updated or modified.
metafields[Metafield]!Metafields stored on this resource.
metafieldMetafieldA single metafield by namespace and key.

Relationships

The Article type is a core content object that represents published or draft articles within a blog. It maintains relationships with several key types:

  • Author: Each article is written by an author, whose information is retrieved through the author field.
  • Blog: Articles belong to a specific blog, accessible via the blog field.
  • Comments: Articles can have associated reader comments through the comments field, with the count available via commentsCount.
  • Metafields: Articles can store custom metadata through the metafields field for extensibility.

Articles are also referenced by queries and can appear as nodes in connection edges throughout the API.

Example

{ article(id: 12345) { id title handle content summary seoTitle seoDescription seoKeywords headerImage url isPublished createdAt updatedAt commentsCount commentsAreEnabled author { name email } blog { title handle } comments { content author } metafields { namespace key value } } }

Implements

This type does not implement any interfaces.