Schema Documentation

User

Description

A User object

Fields
Field NameDescription
avatar - Avatar Avatar object for user. The avatar object can be retrieved in different sizes by specifying the size argument.
Arguments
size - Int

The size attribute of the avatar field can be used to fetch avatars of different sizes. The value corresponds to the dimension in pixels to fetch. The default is 96 pixels.

forceDefault - Boolean

Whether to always show the default image, never the Gravatar. Default false

rating - AvatarRatingEnum

The rating level of the avatar.

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
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 - UserToCommentConnectionWhereArgs

Arguments for filtering the connection

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
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 - UserToEnqueuedStylesheetConnection Connection between the User 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

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
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 - UserToMediaItemConnectionWhereArgs

Arguments for filtering the connection

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
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 - UserToPageConnectionWhereArgs

Arguments for filtering the connection

posts - UserToPostConnection Connection between the User type and the post 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 - UserToPostConnectionWhereArgs

Arguments for filtering the connection

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
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 - UserToRevisionsConnectionWhereArgs

Arguments for filtering the connection

roles - UserToUserRoleConnection Connection between the User type and the UserRole 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

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"}