Schema Documentation
page
Description
An object of the page Type.
Response
Returns a
Page
Arguments
Name | Description |
---|---|
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 node as a preview instance |
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
}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":false}
Response
{"data":{"page":{"ancestors":HierarchicalContentNodeToContentNodeAncestorsConnection,"author":NodeWithAuthorToUserConnectionEdge,"authorDatabaseId":123,"authorId":"4","children":HierarchicalContentNodeToContentNodeChildrenConnection,"commentCount":123,"commentStatus":"xyz789","comments":PageToCommentConnection,"content":"xyz789","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"abc123","databaseId":987,"date":"xyz789","dateGmt":"abc123","desiredSlug":"abc123","editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"xyz789","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":987,"featuredImageId":"4","guid":"abc123","id":"4","isContentNode":false,"isFrontPage":true,"isPostsPage":false,"isPreview":true,"isPrivacyPage":true,"isRestricted":false,"isRevision":true,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"abc123","menuOrder":987,"modified":"xyz789","modifiedGmt":"xyz789","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"}}}