Schema Documentation

page

Description

An object of the page Type.

Response

Returns a Page

Arguments
NameDescription
id - ID! The globally unique identifier of the object.
idType - PageIdType Type of unique identifier to fetch by. Default is Global ID
asPreview - Boolean Whether to return the Preview Node instead of the Published Node. When the ID of a Node is provided along with asPreview being set to true, the preview node with un-published changes will be returned instead of the published node. If no preview node exists or the requestor doesn't have proper capabilities to preview, no node will be returned.

Example

Query
query page(  $id: ID!,  $idType: PageIdType,$asPreview: Boolean){  page(    id: $id,    idType: $idType,    asPreview: $asPreview  ){    ancestors {      ...HierarchicalContentNodeToContentNodeAncestorsConnectionFragment    }author {      ...NodeWithAuthorToUserConnectionEdgeFragment    }authorDatabaseIdauthorIdchildren {      ...HierarchicalContentNodeToContentNodeChildrenConnectionFragment    }commentCountcommentStatuscomments {      ...PageToCommentConnectionFragment    }contentcontentType {      ...ContentNodeToContentTypeConnectionEdgeFragment    }contentTypeNamedatabaseIddatedateGmtdesiredSlugeditingLockedBy {      ...ContentNodeToEditLockConnectionEdgeFragment    }editorBlocks {      ...PageEditorBlockFragment    }enclosureenqueuedScripts {      ...ContentNodeToEnqueuedScriptConnectionFragment    }enqueuedStylesheets {      ...ContentNodeToEnqueuedStylesheetConnectionFragment    }featuredImage {      ...NodeWithFeaturedImageToMediaItemConnectionEdgeFragment    }featuredImageDatabaseIdfeaturedImageIdguididisContentNodeisFrontPageisPostsPageisPreviewisPrivacyPageisRestrictedisRevisionisTermNodelastEditedBy {      ...ContentNodeToEditLastConnectionEdgeFragment    }linkmenuOrdermodifiedmodifiedGmtpageIdparent {      ...HierarchicalContentNodeToParentContentNodeConnectionEdgeFragment    }parentDatabaseIdparentIdpreview {      ...PageToPreviewConnectionEdgeFragment    }previewRevisionDatabaseIdpreviewRevisionIdrevisionOf {      ...NodeWithRevisionsToContentNodeConnectionEdgeFragment    }revisions {      ...PageToRevisionConnectionFragment    }seo {      ...PostTypeSEOFragment    }slugstatustemplate {      ...ContentTemplateFragment    }titleuri  }}
Variables
{"id":4,"idType":"DATABASE_ID","asPreview":true}
Response
{"data":{"page":{"ancestors":HierarchicalContentNodeToContentNodeAncestorsConnection,"author":NodeWithAuthorToUserConnectionEdge,"authorDatabaseId":987,"authorId":4,"children":HierarchicalContentNodeToContentNodeChildrenConnection,"commentCount":987,"commentStatus":"abc123","comments":PageToCommentConnection,"content":"abc123","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","databaseId":123,"date":"abc123","dateGmt":"xyz789","desiredSlug":"abc123","editingLockedBy":ContentNodeToEditLockConnectionEdge,"editorBlocks":[PageEditorBlock],"enclosure":"xyz789","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":987,"featuredImageId":"4","guid":"xyz789","id":4,"isContentNode":false,"isFrontPage":true,"isPostsPage":true,"isPreview":false,"isPrivacyPage":true,"isRestricted":true,"isRevision":false,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"xyz789","menuOrder":987,"modified":"xyz789","modifiedGmt":"abc123","pageId":987,"parent":HierarchicalContentNodeToParentContentNodeConnectionEdge,"parentDatabaseId":987,"parentId":4,"preview":PageToPreviewConnectionEdge,"previewRevisionDatabaseId":987,"previewRevisionId":"4","revisionOf":NodeWithRevisionsToContentNodeConnectionEdge,"revisions":PageToRevisionConnection,"seo":PostTypeSEO,"slug":"xyz789","status":"abc123","template":ContentTemplate,"title":"abc123","uri":"abc123"}}}