Schema Documentation
post
Description
An object of the post Type.
Response
Returns a
Post
Arguments
Name | Description |
---|---|
id -
ID! | The globally unique identifier of the object. |
idType -
PostIdType | Type of unique identifier to fetch by. Default is Global ID |
asPreview -
Boolean | Whether to return the node as a preview instance |
Example
Query
query post(
$id: ID!,
$idType: PostIdType,$asPreview: Boolean
){
post(
id: $id,
idType: $idType,
asPreview: $asPreview
){
author {
...NodeWithAuthorToUserConnectionEdgeFragment
}authorDatabaseIdauthorIdcategories {
...PostToCategoryConnectionFragment
}commentCountcommentStatuscomments {
...PostToCommentConnectionFragment
}contentcontentType {
...ContentNodeToContentTypeConnectionEdgeFragment
}contentTypeNamedatabaseIddatedateGmtdesiredSlugeditingLockedBy {
...ContentNodeToEditLockConnectionEdgeFragment
}enclosureenqueuedScripts {
...ContentNodeToEnqueuedScriptConnectionFragment
}enqueuedStylesheets {
...ContentNodeToEnqueuedStylesheetConnectionFragment
}excerptfeaturedImage {
...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment
}featuredImageDatabaseIdfeaturedImageIdguididisContentNodeisPreviewisRestrictedisRevisionisStickyisTermNodelastEditedBy {
...ContentNodeToEditLastConnectionEdgeFragment
}linkmodifiedmodifiedGmtpingStatuspingedpostFormats {
...PostToPostFormatConnectionFragment
}postIdpreview {
...PostToPreviewConnectionEdgeFragment
}previewRevisionDatabaseIdpreviewRevisionIdrevisionOf {
...NodeWithRevisionsToContentNodeConnectionEdgeFragment
}revisions {
...PostToRevisionConnectionFragment
}seo {
...PostTypeSEOFragment
}slugstatustags {
...PostToTagConnectionFragment
}template {
...ContentTemplateFragment
}terms {
...PostToTermNodeConnectionFragment
}titletoPinguri
}
}
Variables
{"id":4,"idType":"DATABASE_ID","asPreview":true}
Response
{"data":{"post":{"author":NodeWithAuthorToUserConnectionEdge,"authorDatabaseId":123,"authorId":"4","categories":PostToCategoryConnection,"commentCount":123,"commentStatus":"xyz789","comments":PostToCommentConnection,"content":"xyz789","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"abc123","databaseId":123,"date":"xyz789","dateGmt":"abc123","desiredSlug":"abc123","editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"excerpt":"xyz789","featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":123,"featuredImageId":4,"guid":"abc123","id":"4","isContentNode":true,"isPreview":false,"isRestricted":true,"isRevision":false,"isSticky":false,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"abc123","modified":"abc123","modifiedGmt":"xyz789","pingStatus":"abc123","pinged":["abc123"],"postFormats":PostToPostFormatConnection,"postId":123,"preview":PostToPreviewConnectionEdge,"previewRevisionDatabaseId":123,"previewRevisionId":"4","revisionOf":NodeWithRevisionsToContentNodeConnectionEdge,"revisions":PostToRevisionConnection,"seo":PostTypeSEO,"slug":"abc123","status":"abc123","tags":PostToTagConnection,"template":ContentTemplate,"terms":PostToTermNodeConnection,"title":"abc123","toPing":["xyz789"],"uri":"xyz789"}}}