models.graphql
649 Bytes
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
type User {
id: ID!
avatarUrl: String
username: String!
email: String!
password: String!
phoneNum: String!
emailSecret: String
phoneSecret: String
bio: String
rooms: [Room]
createdAt: String
messages: [Message]
sender: [User]
receiver: [User]
}
type Room {
id: ID!
name: String!
participants: [User]
categories: [Category]
messages: [Message]
}
type Category {
id: ID!
name: String
room: Room
messages: [Message]
}
type Message {
id: ID!
text: String!
sender: User!
room: Room!
category: Category
createdAt: String
updatedAt: String
}
type AuthPayload {
token: String
user: User
}