-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
80 lines (68 loc) · 1.77 KB
/
schema.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
68
69
70
71
72
73
74
75
76
77
78
79
80
# This file was generated based on ".graphqlconfig". Do not edit manually.
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
type AuthPayload {
token: String!
tokenExpiration: Int!
user: User!
}
type ChatFeed {
chatId: ID!
chatRoomName: String!
lastMessage: ChatMessage!
participants: [User]!
}
type ChatMessage {
message: String
messageTime: Datetime
receiverId: ID
senderId: ID
}
type ChatRoom {
chatId: ID
chatMessages: [ChatMessage]
}
type FriendRequestStatus {
needToAcceptBy: String
status: String!
}
type Mutation {
acceptRequest(friendId: ID!): String!
changeProfilePicture(image: String!): Boolean!
createFriends(friendId: ID!): String!
refuseRequest(friendId: ID!): String!
savePushNotificationToken(token: String!): String!
sendMsg(chatId: ID!, message: String!, receiverId: ID!): ChatMessage!
signUp(confirmPassword: String!, password: String!, publicKey: Base64, username: String!): AuthPayload!
unFriend(friendId: ID!): String!
}
type Query {
checkIfPushNotificationIsEnabled: Boolean!
fetchTest: String!
getFriendRequests: [User]!
getUserInformation(userId: ID!): User!
getUserProfilePic(userId: ID!): String!
isAuth: Boolean!
loadAllChatFeed: [ChatFeed]!
loadChatContent(chatId: ID!): [ChatMessage]!
loadFriends(status: String!): [User]!
login(password: String!, username: String!): AuthPayload!
searchUser(v: String!): [User]!
}
type Subscription {
chatFeedContent: ChatFeed!
chatRoomContent(chatId: ID!): ChatMessage!
}
type User {
_id: ID
chatId: ID
friendRequestStatus: FriendRequestStatus
profilePic: String
publicKey: Base64!
username: String!
}
scalar Base64
scalar Datetime