Use this nested query to retrieve user details like if the User isLoggedIn or not, to logout, to get activeSessionList and to check if hasPassword set or not.
Response
logged_in_user
UserDetailRetrieve information about the currently logged-in user.
active_sessions
SessionListRetrieve all active sessions of a user.
has_password
HasPasswordCheck if a user has set an account password.
logout
LogoutLogout currently logged-in user.
Query
1query user {2 user {3 logged_in_user {4 id5 account_type6 active7 application_id8 created_at9 dob10 first_name11 gender12 last_name13 meta14 profile_pic_url15 updated_at16 user_id17 username18 external_id19 rr_id20 }21 active_sessions {22 sessions23 }24 has_password {25 result26 }27 logout {28 logout29 }30 }31}
Try it
Response
1{2 "user": {3 "logged_in_user": {4 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",5 "account_type": "account_type",6 "active": true,7 "application_id": "application_id",8 "created_at": "created_at",9 "dob": "dob",10 "first_name": "first_name",11 "gender": "gender",12 "last_name": "last_name",13 "meta": {},14 "profile_pic_url": "profile_pic_url",15 "updated_at": "updated_at",16 "user_id": "user_id",17 "username": "username",18 "external_id": "external_id",19 "rr_id": "rr_id"20 },21 "active_sessions": {22 "sessions": [23 "sessions"24 ]25 },26 "has_password": {27 "result": true28 },29 "logout": {30 "logout": true31 }32 }33}
Was this section helpful?