DLive user type has username and displayname which are both unique. username refers to the blockchain username and displayname refers to the displayname used everywhere in DLive. Users could change their displayname once a month but username could never be changed. Treat username as user ID.
There are two entry point queries for User: user(username:) and userByDisplayName(displayname:)
Sample
Sample GraphQL query which returns some basic info:
But note that, we do have a limit on complexity of the query and a too complex query would receive an HTTP error with code 422.
Me
To obtain user information from an access token. Use me query with user access token in authorization header. Note that some private info need specific scope and if you don't have required scope an error will be returned.
Sample:
query {
me {
username
displayname
private {
email // which requires email:read scope
phone // which requires phone:read scope
}
}
}
Livestream
livestream field in user type indicates whether the user is streaming and corresponding livestream info. null means the user is offline.