Schema Documentation

user

Description

Returns a user

Response

Returns a User

Arguments
NameDescription
id - ID! The globally unique identifier of the user.
idType - UserNodeIdTypeEnum Type of unique identifier to fetch a user by. Default is Global ID

Example

Query
query user(  $id: ID!,  $idType: UserNodeIdTypeEnum){  user(    id: $id,    idType: $idType  ){    avatar {      ...AvatarFragment    }capKeycapabilitiescomments {      ...UserToCommentConnectionFragment    }databaseIddescriptionemailenqueuedScripts {      ...UserToEnqueuedScriptConnectionFragment    }enqueuedStylesheets {      ...UserToEnqueuedStylesheetConnectionFragment    }extraCapabilitiesfirstNameidisContentNodeisJwtAuthSecretRevokedisRestrictedisTermNodejwtAuthExpirationjwtAuthTokenjwtRefreshTokenjwtUserSecretlastNamelocalemediaItems {      ...UserToMediaItemConnectionFragment    }namenicenamenicknamepages {      ...UserToPageConnectionFragment    }posts {      ...UserToPostConnectionFragment    }registeredDaterevisions {      ...UserToRevisionsConnectionFragment    }roles {      ...UserToUserRoleConnectionFragment    }seo {      ...SEOUserFragment    }shouldShowAdminToolbarsluguriurluserIdusernamewooSessionToken  }}
Variables
{"id":"4","idType":"DATABASE_ID"}
Response
{"data":{"user":{"avatar":Avatar,"capKey":"xyz789","capabilities":["abc123"],"comments":UserToCommentConnection,"databaseId":987,"description":"abc123","email":"abc123","enqueuedScripts":UserToEnqueuedScriptConnection,"enqueuedStylesheets":UserToEnqueuedStylesheetConnection,"extraCapabilities":["abc123"],"firstName":"abc123","id":"4","isContentNode":false,"isJwtAuthSecretRevoked":false,"isRestricted":false,"isTermNode":true,"jwtAuthExpiration":"abc123","jwtAuthToken":"abc123","jwtRefreshToken":"abc123","jwtUserSecret":"xyz789","lastName":"xyz789","locale":"abc123","mediaItems":UserToMediaItemConnection,"name":"xyz789","nicename":"xyz789","nickname":"xyz789","pages":UserToPageConnection,"posts":UserToPostConnection,"registeredDate":"xyz789","revisions":UserToRevisionsConnection,"roles":UserToUserRoleConnection,"seo":SEOUser,"shouldShowAdminToolbar":false,"slug":"abc123","uri":"xyz789","url":"abc123","userId":987,"username":"abc123","wooSessionToken":"abc123"}}}