# User Queries
These are the queries defined under the user model, there are used to fetch data from the api regarding users
# getUserWithId
getUserWithId(uid: Int) : User
1
used to get user using just their id
# me
me: User
1
used to get user data for currently logged in user
# getUser
getUser: User
1
name alias for me
query
# getAllUsers
getAllUsers(page: Int, range: Int): [User]
1
used to get all the users as array. only admin users has access to this query
# isUserNameTaken
isUserNameTaken(username: String) : Boolean
1
Query to check if a username is taken not.
# isEmailUsed
isEmailUsed(email: String) : Boolean
1
Query to check if an email is taken not.
# isPasswordResetTokenValid
isPasswordResetTokenValid(token: String) : Boolean
1
Query to check if a password reset token is valid
# isEmailVerified
isEmailVerified: Boolean
1
Query to check if the user's email address is verified.
# getCurrentUserToken
getCurrentUserToken: Token
1
Query to get the current used token
# Graphql Schema
gql schema for this model goes
extend type Query {
getUserWithId(uid: Int) : User # ONLY FOR ADMIN ROLE USERS!
me: User
getUser: User # The same as the above query but more explainatory naming
getAllUsers(page: Int, range: Int): [User]
isUserNameTaken(username: String) : Boolean
isEmailUsed(email: String) : Boolean
isPasswordResetTokenValid(token: String) : Boolean
isEmailVerified: Boolean
getCurrentUserToken: Token
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
← Provider Post Queries →