Viewer
Query the authenticated user's details and associated accounts.
Returns the authenticated user's details. Use this to verify your token is working or to list the accounts you have access to.
viewer
Lookup the details of the authenticated user.
Example Request
query {
viewer {
id
firstName
lastName
email
}
}Example Response
{
"data": {
"viewer": {
"id": "VXNlcjp6a2dkZXk=",
"firstName": "John",
"lastName": "Doe",
"email": "[john.doe@example.com]",
}
}
}Objects
User
| Field | Type | Description |
|---|---|---|
| id | ID! | The ID of the object. |
| firstName | String! | First name of the user. |
| lastName | String! | Last name of the user. |
| String! | Email of the user. | |
| isBetaTester | Boolean! | Whether the user is a beta tester. |
| analyticsId | String | Analytics identifier for the user. |
| ideSubscription | IDESubscription | The user's IDE subscription details. |
| accounts | AccountConnection | All the accounts associated with the user. This includes the team accounts the user is part of and the individual accounts they have added on DeepSource. |
IDESubscription
IDE subscription details for a user.
| Field | Type | Description |
|---|---|---|
| plan | IDESubscriptionPlan! | The user's IDE subscription plan. |