sdy

update graphql schema

...@@ -11,28 +11,30 @@ type User { ...@@ -11,28 +11,30 @@ type User {
11 rooms: [Room] 11 rooms: [Room]
12 createdAt: String 12 createdAt: String
13 messages: [Message] 13 messages: [Message]
14 - from: Message 14 + sender: [User]
15 - to: [Message] 15 + receiver: [User]
16 } 16 }
17 17
18 type Room { 18 type Room {
19 id: ID! 19 id: ID!
20 + name: String!
20 participants: [User] 21 participants: [User]
21 categories: [Category] 22 categories: [Category]
23 + messages: [Message]
22 } 24 }
23 25
24 type Category { 26 type Category {
25 id: ID! 27 id: ID!
26 name: String 28 name: String
27 - rooms: [Room] 29 + room: Room
28 } 30 }
29 31
30 type Message { 32 type Message {
31 id: ID! 33 id: ID!
32 text: String! 34 text: String!
33 - from: [User] 35 + sender: User
34 - to: [User] 36 + room: Room
35 - room: Room! 37 + category: Category
36 createdAt: String 38 createdAt: String
37 updatedAt: String 39 updatedAt: String
38 } 40 }
......