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 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    }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":123,"commentStatus":"xyz789","comments":PageToCommentConnection,"content":"xyz789","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"abc123","databaseId":123,"date":"abc123","dateGmt":"xyz789","desiredSlug":"abc123","editingLockedBy":ContentNodeToEditLockConnectionEdge,"editorBlocks":[PageEditorBlock],"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"featuredImage":NodeWithFeaturedImageToMediaItemConnectionEdge,"featuredImageDatabaseId":987,"featuredImageId":4,"guid":"xyz789","id":"4","isContentNode":false,"isFrontPage":true,"isPostsPage":true,"isPreview":true,"isPrivacyPage":true,"isRestricted":false,"isRevision":true,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"xyz789","menuOrder":123,"modified":"abc123","modifiedGmt":"xyz789","pageId":123,"parent":HierarchicalContentNodeToParentContentNodeConnectionEdge,"parentDatabaseId":987,"parentId":4,"preview":PageToPreviewConnectionEdge,"previewRevisionDatabaseId":123,"previewRevisionId":4,"revisionOf":NodeWithRevisionsToContentNodeConnectionEdge,"revisions":PageToRevisionConnection,"seo":PostTypeSEO,"slug":"abc123","status":"xyz789","template":ContentTemplate,"title":"abc123","uri":"abc123"}}}
©  2021-2023WPGraphQL WooCommerce.All rights reserved.