-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
152 lines (131 loc) · 3.61 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
### This file was generated by Nexus Schema
### Do not make changes to this file directly
type AuthResponse {
errors: [PathError]
user: User
}
type DM {
createdAt: DateTime!
id: String!
lastMessageDate: DateTime
messages(after: MessageWhereUniqueInput, before: MessageWhereUniqueInput, first: Int, last: Int): [Message!]!
recipients(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
type: DMType!
visibility(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
}
enum DMType {
GROUP
ONE_TO_ONE
}
input DMWhereUniqueInput {
id: String
}
scalar DateTime
type FriendRequest {
id: Int!
incoming: Boolean
recipient: User!
recipientId: String!
requestedAt: DateTime!
requester: User!
requesterId: String!
status: RequestStatus!
}
input FriendRequestWhereUniqueInput {
id: Int
}
type Message {
DM: DM
content: String!
createdAt: DateTime!
dmId: String
edited: Boolean!
id: String!
mentions(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
parentMessage: Message
parentMessageId: String
readBy(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
replies(after: MessageWhereUniqueInput, before: MessageWhereUniqueInput, first: Int, last: Int): [Message!]!
senderId: String!
updatedAt: DateTime!
}
input MessageWhereUniqueInput {
id: String
}
type Mutation {
createDM(recipientsIds: [String!]!): DM
deleteOneUser(where: UserWhereUniqueInput!): User
login(values: loginInput!): AuthResponse!
register(values: registerInput!): AuthResponse!
rejectOrAcceptFriendRequest(friendRequestId: Int!, type: TypesOfFriendRequestMutation!): Boolean!
sendFriendRequest(userId: String!): FriendRequest
sendMessage(content: String!, dmId: String!): Message
toggleDMVisibility(dmId: String!): DM
}
type PathError {
message: String!
path: String!
}
type Query {
allFriends: [User]
me: User
myFriendRequests: [FriendRequest]
myVisibleDMs: [DM]
onlineFriends: [User]
users: [User]!
}
enum RequestStatus {
ACCEPTED
PENDING
REJECTED
}
type Subscription {
sendMessage(dmId: String!): Message
}
enum TypesOfFriendRequestMutation {
ACCEPT
REJECT
}
type User {
DM(after: DMWhereUniqueInput, before: DMWhereUniqueInput, first: Int, last: Int): [DM!]!
aboutMe: String
asRecipientPending: Boolean
asRequesterPending: Boolean
avatar: String
banner: String
blocked(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
blockedRelation(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
color: String!
createdAt: DateTime!
discriminator: String!
email: String!
friends(after: UserWhereUniqueInput, before: UserWhereUniqueInput, first: Int, last: Int): [User!]!
id: String!
incomingFriendRequest(after: FriendRequestWhereUniqueInput, before: FriendRequestWhereUniqueInput, first: Int, last: Int): [FriendRequest!]!
outgoingFriendRequest(after: FriendRequestWhereUniqueInput, before: FriendRequestWhereUniqueInput, first: Int, last: Int): [FriendRequest!]!
status: UserStatus!
telephone: String
updatedAt: DateTime!
username: String!
verified: Boolean!
visibleDM(after: DMWhereUniqueInput, before: DMWhereUniqueInput, first: Int, last: Int): [DM!]!
}
enum UserStatus {
DO_NOT_DISTURB
IDLE
INVISIBLE
ONLINE
}
input UserWhereUniqueInput {
email: String
id: String
}
input loginInput {
emailOrPhone: String!
password: String!
}
input registerInput {
email: String!
password: String!
username: String!
}