Schema Documentation
viewer
Description
Returns the current user
Response
Returns a User
Example
Query
query viewer { viewer { avatar { ...AvatarFragment }capKeycapabilitiescomments { ...UserToCommentConnectionFragment }databaseIddescriptionemailenqueuedScripts { ...UserToEnqueuedScriptConnectionFragment }enqueuedStylesheets { ...UserToEnqueuedStylesheetConnectionFragment }extraCapabilitiesfirstNameidisContentNodeisJwtAuthSecretRevokedisRestrictedisTermNodejwtAuthExpirationjwtAuthTokenjwtRefreshTokenjwtUserSecretlastNamelocalemediaItems { ...UserToMediaItemConnectionFragment }namenicenamenicknamepages { ...UserToPageConnectionFragment }posts { ...UserToPostConnectionFragment }registeredDaterevisions { ...UserToRevisionsConnectionFragment }roles { ...UserToUserRoleConnectionFragment }seo { ...SEOUserFragment }shouldShowAdminToolbarsluguriurluserIdusernamewooSessionToken }}
Response
{"data":{"viewer":{"avatar":Avatar,"capKey":"xyz789","capabilities":["abc123"],"comments":UserToCommentConnection,"databaseId":987,"description":"xyz789","email":"xyz789","enqueuedScripts":UserToEnqueuedScriptConnection,"enqueuedStylesheets":UserToEnqueuedStylesheetConnection,"extraCapabilities":["abc123"],"firstName":"abc123","id":"4","isContentNode":true,"isJwtAuthSecretRevoked":false,"isRestricted":false,"isTermNode":true,"jwtAuthExpiration":"abc123","jwtAuthToken":"xyz789","jwtRefreshToken":"abc123","jwtUserSecret":"xyz789","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":false,"slug":"xyz789","uri":"abc123","url":"xyz789","userId":123,"username":"abc123","wooSessionToken":"xyz789"}}}