-
Notifications
You must be signed in to change notification settings - Fork 0
/
accounts.graphql
67 lines (60 loc) · 1.7 KB
/
accounts.graphql
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.7"
import: ["@key", "@shareable", "@inaccessible"]
)
type Query {
user(id: ID!): User
"Currently logged-in user"
me: User!
}
type User @key(fields: "id") {
id: ID!
"The user's first and last name"
name: String!
"The user's profile bio description, will be shown in the listing"
profileDescription: String!
"The last recorded activity timestamp of the user"
lastActiveTime: String
"Whether or not a user is logged in"
isLoggedIn: Boolean!
}
type Mutation {
### Accounts
"Updates the logged-in user's profile information"
updateProfile(updateProfileInput: UpdateProfileInput): UpdateProfileResponse!
"Logs the user in or out"
changeLoggedInStatus: LoginStatusResponse
}
type LoginStatusResponse {
"Whether or not the login or logout succeeded"
success: Boolean!
"The timestamp of the login or logout"
time: String
"A message describing the status of the login or logout"
message: String!
}
interface MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
code: Int!
"Indicates whether the mutation was successful"
success: Boolean!
"Human-readable message for the UI"
message: String!
}
input UpdateProfileInput {
"The user's first and last name"
name: String
"The user's profile bio description, will be shown in the listing"
profileDescription: String
}
type UpdateProfileResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
code: Int!
"Indicates whether the mutation was successful"
success: Boolean!
"Human-readable message for the UI"
message: String!
"Updated user"
user: User
}