-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.graphqls
35 lines (29 loc) · 964 Bytes
/
user.graphqls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# User account information.
input UserAccount {
firstname: String!
lastname: String!
email: String!
userLoginCredentials: UserLoginCredentials!
}
# Login credentials.
input UserLoginCredentials {
username: String!
password: String!
}
# User account deletion request.
input DeleteUserRequest {
username: String!
password: String!
confirmation: String!
}
# Requests that might alter the state of data in the database.
type Mutation {
# Send a user registration request and receive a JWT authorization token in response.
registerUser(input: UserAccount): JWTAuthResponse!
# Send a user account deletion request.
deleteUser(input: DeleteUserRequest!): String!
# Send a user login request And receive a JWT authorization token in response.
loginUser(input: UserLoginCredentials!): JWTAuthResponse!
# Refreshes a users JWT if it is within the refresh time window.
refreshToken: JWTAuthResponse!
}