---
title: "article"
description: "通过文章ID查询文章"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/online-store/queries/article'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/online-store/queries/article.md'
---
# article

通过文章ID查询文章

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`Article`

## Arguments

* `id`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  文章的ID

## Returns

* `author`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  博客文章作者

* `blog`

  [Blog](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/online-store/objects/blog.md)

  关联的博客集对象

* `comments`

  [CommentConnection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/comment-connection.md)

  评论

* `content`

  [HTML](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/html.md)

  博客的正文，不带有HTML标记

* `digest`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  文章摘要，不带有HTML标记

* `handle`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  博客文章的handle

* `id`

  [ID](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/id.md)

  博客文章id

* `image`

  [Image](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/image.md)

  封面图

* `onlineStoreUrl`

  [URL](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/url.md)

  访问该资源的店铺地址

* `publishedAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/date.md)

  发布时间

* `seo`

  [SEO](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/seo.md)

  SEO

* `tags`

  [[String]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  博客文章关联的标签

* `title`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  博客文章标题

## Code Example

```graphql
 {
	article(id ) 
		 {
			# Article fields
		}
}
```

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

