forked from SingingRunner/singing-runner-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.gql
206 lines (179 loc) · 4.28 KB
/
schema.gql
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type User {
userId: String!
userEmail: String!
password: String!
nickname: String!
userActive: Int!
userKeynote: Int!
userMmr: Int!
userPoint: Int!
character: String!
deletedAt: DateTime
refreshToken: String
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type FriendDto {
userId: String!
nickname: String!
userActive: Int!
userMmr: Int!
character: String!
userTier: String!
}
type RequestDto {
senderId: String!
senderNickname: String!
receivedAt: DateTime!
}
type SearchFriendDto {
userId: String!
userMmr: Int!
userTier: String!
nickname: String!
userActive: Int!
character: String!
}
type GameSongDto {
songId: Int!
songTitle: String!
singer: String!
songLyrics: String!
songGender: Boolean!
songMale: String!
songMaleUp: String!
songMaleDown: String!
songFemale: String!
songFemaleUp: String!
songFemaleDown: String!
vocalMale: String!
vocalMaleUp: String!
vocalMaleDown: String!
}
type Reply {
message: String!
code: Int!
}
type AuthUserDto {
userId: String!
userEmail: String!
nickname: String!
userActive: Int!
userKeynote: Int!
userMmr: Int!
userPoint: Int!
character: String!
userTier: String!
}
type AuthDto {
accessToken: String!
user: User!
}
type AuthTokenDto {
accessToken: String!
}
type UserCharacterResponseDto {
userId: String!
character: characterEnum!
}
enum characterEnum {
BELUGA
PUMA
HUSKY
HARE
LYNX
LEOPARD
NARWHAL
PUFFIN
MOOSE
}
type UserKeynoteResponseDto {
userId: String!
userKeynote: Int!
}
type ReplayWithSongInfo {
replayId: Int!
createdAt: DateTime!
isPublic: Int!
songTitle: String!
singer: String!
}
type ReplayIsPublicResponseDto {
replayId: String!
isPublic: Int!
}
type Query {
searchSong(keyword: String!, page: Int!, filter: String!): [GameSongDto!]!
getNotification(userId: String!, page: Int!): [RequestDto!]!
searchFriend(userId: String!, nickname: String!, page: Int!): [SearchFriendDto!]!
searchUser(userId: String!, nickname: String!, page: Int!): [FriendDto!]!
isEmailTaken(userEmail: String!): Boolean!
isNicknameTaken(nickname: String!): Boolean!
fetchUser: AuthUserDto!
fetchUserByUserId(userId: String!): AuthUserDto!
getUserReplays(isMyReplay: Boolean!, pageNumber: Int!, userId: String!): [ReplayWithSongInfo!]!
}
type Mutation {
saveReplay(userVocal: String!, userId: String!): Reply!
addFriend(addFriendDto: AddFriendDto!): String!
removeFriend(addFriendDto: AddFriendDto!): String!
inviteFriend(friendId: String!, hostUserDto: HostUserInput!): String!
friendRequest(notificationDto: NotificationDto!): String!
deleteNotification(notificationDto: NotificationDto!): String!
registerUser(newUser: UserRegisterDto!): AuthDto!
registerUserWithKakao(kakaoUserResponse: KakaoUserResponseDto!, nickname: String!): AuthDto!
registerUserWithGoogle(googleUserDto: GoogleUserResponseDto!, nickname: String!): AuthDto!
loginUser(userAuthDto: UserAuthDto!): AuthDto!
loginUserWithKakao(kakaoUserResponse: KakaoUserResponseDto!): AuthDto!
loginUserWithGoogle(googleUserResponse: GoogleUserResponseDto!): AuthDto!
refreshAccessToken: AuthTokenDto!
logout(userId: String!): String!
updateCharacter(userId: String!, character: String!): UserCharacterResponseDto!
updateUserKeynote(userId: String!, keynote: userKeynoteStatus!): UserKeynoteResponseDto!
updateReplayIsPublic(replayId: Int!, isPublic: Int!): ReplayIsPublicResponseDto!
}
input AddFriendDto {
userId: String!
friendId: String!
}
input HostUserInput {
userId: String!
nickname: String!
}
input NotificationDto {
userId: String!
senderId: String!
}
input UserRegisterDto {
userEmail: String!
password: String
nickname: String!
}
input KakaoUserResponseDto {
id: String!
kakao_account: KakaoAccount!
}
input KakaoAccount {
email: String!
}
input GoogleUserResponseDto {
googleId: String!
google_account: GoogleAccount!
}
input GoogleAccount {
email: String!
}
input UserAuthDto {
userEmail: String!
password: String!
}
enum userKeynoteStatus {
ORIGINAL_KEY
FEMALE_KEY
MALE_KEY
}