article Query
Description
Retrieves a single article by ID, homepage flag, or handle.
query article(
$id: Int
$homepage: Boolean
$handle: String
$preview: Boolean
) {
article(id: $id, homepage: $homepage, handle: $handle, preview: $preview) {
_id
id
created
modified
published {
status
date
}
url
seo {
index
description
slug
title
}
private
content {
text
html
editor
}
homepage
thumbnail {
_id
id
title
ext
url
size
width
height
caption
mime
alt
created
}
title
type
tags
handle
}
}
Variables
{
"id": 4264890005755,
"homepage": true,
"handle": "handle",
"preview": true
}
Response
{
"article": {
"_id": "b9d6770972f10f4d843d23cb",
"id": 686927352540,
"created": 1714940979143,
"modified": 1716519826503,
"published": {
"status": true,
"date": 1758073064420
},
"url": "https://example.com",
"seo": {
"index": true,
"description": "example",
"slug": "example",
"title": "example"
},
"private": true,
"content": {
"text": "example",
"html": "example",
"editor": {}
},
"homepage": true,
"thumbnail": {
"_id": "c24da9b1aa1b31ab6c132b5b",
"id": 3646778738800,
"title": "example",
"ext": "example",
"url": "https://example.com",
"size": 42,
"width": 42,
"height": 42,
"caption": "example",
"mime": "example",
"alt": "example",
"created": 1705322499660
},
"title": "example",
"type": "post",
"tags": [
"example"
],
"handle": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
id | Int | Numeric identifier for the article. |
homepage | Boolean | Whether to retrieve the homepage article. |
handle | String | URL-friendly handle for the article. |
preview | Boolean | Whether to return preview content for unpublished articles. |