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 |
isJwtAuthSecretRevoked - Boolean! | Whether the JWT User secret has been revoked. If the secret has been revoked, auth tokens will not be issued until an admin, or user with proper capabilities re-issues a secret for the user. |
isRestricted - Boolean | Whether the object is restricted from the current viewer |
isTermNode - Boolean! | Whether the node is a Term |
jwtAuthExpiration - String | The expiration for the JWT Token for the user. If not set custom for the user, it will use the default sitewide expiration setting |
jwtAuthToken - String | A JWT token that can be used in future requests for authentication/authorization |
jwtRefreshToken - String | A JWT token that can be used in future requests to get a refreshed jwtAuthToken. If the refresh token used in a request is revoked or otherwise invalid, a valid Auth token will NOT be issued in the response headers. |
jwtUserSecret - String | A unique secret tied to the users JWT token that can be revoked or refreshed. Revoking the secret prevents JWT tokens from being issued to the user. Refreshing the token invalidates previously issued tokens, but allows new tokens to be issued. |
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":"xyz789","capabilities":["abc123"],"comments":UserToCommentConnection,"databaseId":123,"description":"xyz789","email":"xyz789","enqueuedScripts":UserToEnqueuedScriptConnection,"enqueuedStylesheets":UserToEnqueuedStylesheetConnection,"extraCapabilities":["xyz789"],"firstName":"xyz789","id":"4","isContentNode":true,"isJwtAuthSecretRevoked":false,"isRestricted":false,"isTermNode":true,"jwtAuthExpiration":"xyz789","jwtAuthToken":"xyz789","jwtRefreshToken":"xyz789","jwtUserSecret":"abc123","lastName":"abc123","locale":"xyz789","mediaItems":UserToMediaItemConnection,"name":"abc123","nicename":"xyz789","nickname":"xyz789","pages":UserToPageConnection,"posts":UserToPostConnection,"registeredDate":"xyz789","revisions":UserToRevisionsConnection,"roles":UserToUserRoleConnection,"seo":SEOUser,"shouldShowAdminToolbar":true,"slug":"abc123","uri":"abc123","url":"abc123","userId":123,"username":"xyz789","wooSessionToken":"xyz789"}