Schema Documentation
User
Description
A User object
Fields
Field Name | Description |
---|---|
avatar - Avatar | Avatar object for user. The avatar object can be retrieved in different sizes by specifying the size argument. |
Arguments
| |
capKey - String | User metadata option name. Usually it will be "wp_capabilities". |
capabilities - [String] | A list of capabilities (permissions) granted to the user |
comments - UserToCommentConnection | Connection between the User type and the Comment type |
Arguments
| |
databaseId - Int! | Identifies the primary key from the database. |
description - String | Description of the user. |
email - String | Email address of the user. This is equivalent to the WP_User->user_email property. |
enqueuedScripts - UserToEnqueuedScriptConnection | Connection between the User type and the EnqueuedScript type |
Arguments
| |
enqueuedStylesheets - UserToEnqueuedStylesheetConnection | Connection between the User type and the EnqueuedStylesheet type |
Arguments
| |
extraCapabilities - [String] | A complete list of capabilities including capabilities inherited from a role. This is equivalent to the array keys of WP_User->allcaps. |
firstName - String | First name of the user. This is equivalent to the WP_User->user_first_name property. |
id - ID! | The globally unique identifier for the user object. |
isContentNode - Boolean! | Whether the node is a Content Node |
isRestricted - Boolean | Whether the object is restricted from the current viewer |
isTermNode - Boolean! | Whether the node is a Term |
lastName - String | Last name of the user. This is equivalent to the WP_User->user_last_name property. |
locale - String | The preferred language locale set for the user. Value derived from get_user_locale(). |
mediaItems - UserToMediaItemConnection | Connection between the User type and the mediaItem type |
Arguments
| |
name - String | Display name of the user. This is equivalent to the WP_User->dispaly_name property. |
nicename - String | The nicename for the user. This field is equivalent to WP_User->user_nicename |
nickname - String | Nickname of the user. |
pages - UserToPageConnection | Connection between the User type and the page type |
Arguments
| |
posts - UserToPostConnection | Connection between the User type and the post type |
Arguments
| |
registeredDate - String | The date the user registered or was created. The field follows a full ISO8601 date string format. |
revisions - UserToRevisionsConnection | Connection between the User and Revisions authored by the user |
Arguments
| |
roles - UserToUserRoleConnection | Connection between the User type and the UserRole type |
Arguments
| |
seo - SEOUser | The Yoast SEO data of a user |
shouldShowAdminToolbar - Boolean | Whether the Toolbar should be displayed when the user is viewing the site. |
slug - String | The slug for the user. This field is equivalent to WP_User->user_nicename |
uri - String | The unique resource identifier path |
url - String | A website url that is associated with the user. |
userId - Int | The Id of the user. Equivalent to WP_User->ID Deprecated in favor of the databaseId field |
username - String | Username for the user. This field is equivalent to WP_User->user_login. |
wooSessionToken - String | A JWT token that can be used in future requests to for WooCommerce session identification |
Example
{"avatar":Avatar,"capKey":"abc123","capabilities":["xyz789"],"comments":UserToCommentConnection,"databaseId":123,"description":"xyz789","email":"abc123","enqueuedScripts":UserToEnqueuedScriptConnection,"enqueuedStylesheets":UserToEnqueuedStylesheetConnection,"extraCapabilities":["xyz789"],"firstName":"abc123","id":4,"isContentNode":true,"isRestricted":false,"isTermNode":true,"lastName":"abc123","locale":"abc123","mediaItems":UserToMediaItemConnection,"name":"abc123","nicename":"abc123","nickname":"xyz789","pages":UserToPageConnection,"posts":UserToPostConnection,"registeredDate":"xyz789","revisions":UserToRevisionsConnection,"roles":UserToUserRoleConnection,"seo":SEOUser,"shouldShowAdminToolbar":true,"slug":"abc123","uri":"abc123","url":"xyz789","userId":123,"username":"abc123","wooSessionToken":"abc123"}