Schema Documentation

Page

Description

The page type

Fields
Field NameDescription
ancestors - HierarchicalContentNodeToContentNodeAncestorsConnection Returns ancestors of the node. Default ordered as lowest (closest to the child) to highest (closest to the root).
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - HierarchicalContentNodeToContentNodeAncestorsConnectionWhereArgs

Arguments for filtering the connection

author - NodeWithAuthorToUserConnectionEdge Connection between the NodeWithAuthor type and the User type
authorDatabaseId - Int The database identifier of the author of the node
authorId - ID The globally unique identifier of the author of the node
children - HierarchicalContentNodeToContentNodeChildrenConnection Connection between the HierarchicalContentNode type and the ContentNode type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - HierarchicalContentNodeToContentNodeChildrenConnectionWhereArgs

Arguments for filtering the connection

commentCount - Int The number of comments. Even though WPGraphQL denotes this field as an integer, in WordPress this field should be saved as a numeric string for compatibility.
commentStatus - String Whether the comments are open or closed for this particular post.
comments - PageToCommentConnection Connection between the Page type and the Comment type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - PageToCommentConnectionWhereArgs

Arguments for filtering the connection

content - String The content of the post.
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

contentType - ContentNodeToContentTypeConnectionEdge Connection between the ContentNode type and the ContentType type
contentTypeName - String! The name of the Content Type the node belongs to
databaseId - Int! The unique identifier stored in the database
date - String Post publishing date.
dateGmt - String The publishing date set in GMT.
desiredSlug - String The desired slug of the post
editingLockedBy - ContentNodeToEditLockConnectionEdge If a user has edited the node within the past 15 seconds, this will return the user that last edited. Null if the edit lock doesn't exist or is greater than 15 seconds
editorBlocks - [PageEditorBlock] List of page editor blocks
Arguments
flat - Boolean
enclosure - String The RSS enclosure for the object
enqueuedScripts - ContentNodeToEnqueuedScriptConnection Connection between the ContentNode type and the EnqueuedScript type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

enqueuedStylesheets - ContentNodeToEnqueuedStylesheetConnection Connection between the ContentNode type and the EnqueuedStylesheet type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

featuredImage - NodeWithFeaturedImageToMediaItemConnectionEdge Connection between the NodeWithFeaturedImage type and the MediaItem type
featuredImageDatabaseId - Int The database identifier for the featured image node assigned to the content node
featuredImageId - ID Globally unique ID of the featured image assigned to the node
guid - String The global unique identifier for this post. This currently matches the value stored in WP_Post->guid and the guid column in the "post_objects" database table.
id - ID! The globally unique identifier of the page object.
isContentNode - Boolean! Whether the node is a Content Node
isFrontPage - Boolean! Whether this page is set to the static front page.
isPostsPage - Boolean! Whether this page is set to the blog posts page.
isPreview - Boolean Whether the object is a node in the preview state
isPrivacyPage - Boolean! Whether this page is set to the privacy page.
isRestricted - Boolean Whether the object is restricted from the current viewer
isRevision - Boolean True if the node is a revision of another node
isTermNode - Boolean! Whether the node is a Term
lastEditedBy - ContentNodeToEditLastConnectionEdge The user that most recently edited the node
link - String The permalink of the post
menuOrder - Int A field used for ordering posts. This is typically used with nav menu items or for special ordering of hierarchical content types.
modified - String The local modified time for a post. If a post was recently updated the modified field will change to match the corresponding time.
modifiedGmt - String The GMT modified time for a post. If a post was recently updated the modified field will change to match the corresponding time in GMT.
pageId - Int! The id field matches the WP_Post->ID field. Deprecated in favor of the databaseId field
parent - HierarchicalContentNodeToParentContentNodeConnectionEdge The parent of the node. The parent object can be of various types
parentDatabaseId - Int Database id of the parent node
parentId - ID The globally unique identifier of the parent node.
preview - PageToPreviewConnectionEdge Connection between the Page type and the page type
previewRevisionDatabaseId - Int The database id of the preview node
previewRevisionId - ID Whether the object is a node in the preview state
revisionOf - NodeWithRevisionsToContentNodeConnectionEdge If the current node is a revision, this field exposes the node this is a revision of. Returns null if the node is not a revision of another node.
revisions - PageToRevisionConnection Connection between the Page type and the page type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - PageToRevisionConnectionWhereArgs

Arguments for filtering the connection

seo - PostTypeSEO The Yoast SEO data of the ContentNode
slug - String The uri slug for the post. This is equivalent to the WP_Post->post_name field and the post_name column in the database for the "post_objects" table.
status - String The current status of the object
template - ContentTemplate The template assigned to a node of content
title - String The title of the post. This is currently just the raw title. An amendment to support rendered title needs to be made.
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

uri - String The unique resource identifier path
Example
{"ancestors":HierarchicalContentNodeToContentNodeAncestorsConnection,"author":NodeWithAuthorToUserConnectionEdge,"authorDatabaseId":987,"authorId":"4","children":HierarchicalContentNodeToContentNodeChildrenConnection,"commentCount":123,"commentStatus":"abc123","comments":PageToCommentConnection,"content":"abc123","contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"xyz789","databaseId":987,"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":false,"isPreview":false,"isPrivacyPage":true,"isRestricted":true,"isRevision":true,"isTermNode":true,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"abc123","menuOrder":123,"modified":"abc123","modifiedGmt":"xyz789","pageId":123,"parent":HierarchicalContentNodeToParentContentNodeConnectionEdge,"parentDatabaseId":123,"parentId":"4","preview":PageToPreviewConnectionEdge,"previewRevisionDatabaseId":987,"previewRevisionId":"4","revisionOf":NodeWithRevisionsToContentNodeConnectionEdge,"revisions":PageToRevisionConnection,"seo":PostTypeSEO,"slug":"xyz789","status":"xyz789","template":ContentTemplate,"title":"xyz789","uri":"xyz789"}