This repository was archived by the owner on Oct 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdynamite.graphql
More file actions
378 lines (320 loc) · 6.33 KB
/
dynamite.graphql
File metadata and controls
378 lines (320 loc) · 6.33 KB
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
scalar Date
scalar NonNegativeInt
type Announcement {
_id: String
userId: String
title: String
content: [String]
createTime: Date
}
# 游戏元数据
type GameSetting {
appVer: Int
judgement: HpSetting
}
# ?
type HpSetting {
perfect: Int
good: Int
miss: Int
maxHp: Int
startHp: Int
}
# 考级组数据
#(包含多个考级谱)
type AssessmentGroup {
_id: String
name: String
assessment: [Assessment]
}
# 考级谱数据
type Assessment {
_id: String
medalLevel: Int
lifeBarLength: Float
normalPassAcc: Float
goldenPassAcc: Float
exMiss: Float
chart: [AssessmentChart]
assessmentRecord: [AssessmentRecord]
}
# 考级谱面信息
type AssessmentChart {
_id: String # 这个字段必须与 set.chart 中的某个 _id 字段相同
set: ChartSet
}
# 综合考级游玩成绩
type AssessmentRecord {
achievementRate: Float
isBest: Boolean
playRecord: [AssessmentPlayRecord]
}
# 谱面集合
#(包含各种难度的谱面)
type ChartSet {
_id: String
introduction: String
coinPrice: Int
noter: ChartNoter
musicTitle: String
composerName: String,
playCount: Int,
chart: [Chart]
isGot: Boolean
isRanked: Boolean
OverridePriceStr: String
}
# 谱面作者
type ChartNoter {
username: String
}
# 谱面
type Chart {
_id: String
difficultyClass: Int
difficultyValue: Int
}
# 详细谱面信息
type DetailedChart {
charter: User
chartName: String
gcPrice: Int
music: Music
difficultyBase: Int
difficultyValue: Int
}
# 音乐信息
type Music {
_id: String
musicName: String
musician: Musician
}
# 音乐家信息
type Musician {
musicianName: String
}
# 用户信息
type User {
_id: String
username: String
ownChart: [String]
coworkChart: [String]
ownSet: [String]
follower: Int
coin: Int
diamond: Int
PPTime: String
token: String
RThisMonth: Int
access: UserAccess
}
# 用户权限信息
type UserAccess {
reviewer: Boolean
}
# 单次考级游玩成绩
type AssessmentPlayRecord {
perfect: Int
good: Int
miss: Int
score: Int
}
# 开始游玩前提交返回
type BeforePlaySubmit {
PPTime: String
playingRecord: PlayingRecord
}
# ?
type PlayingRecord {
randomId: String
}
# 游玩记录
input PlayRecordInput {
mod: PlayModInput
isAlive: Boolean
score: Int
perfect: Int
good: Int
miss: Int
}
# 游玩修饰
# (因 GQL 限制,input 和 type 不能共存,所以 input 版本的 PlayMod 改称 PlayModInput)
input PlayModInput {
narrow: Float
speed: Float
isBleed: Boolean
isMirror: Boolean
}
# 游玩修饰
type PlayMod {
narrow: Float
speed: Float
isBleed: Boolean
isMirror: Boolean
}
# 考级结束游玩后提交返回
# (与普通游玩结束后返回数据不同!)
type AssessmentAfterPlaySubmit {
result: Int
RThisMonth: Int
coin: Int
diamond: Int
}
# 结束游玩后提交返回
# (与考级游玩结束后返回数据不同!)
type AfterPlaySubmit {
ranking: Ranking
RThisMonth: Int
coin: Int
diamond: Int
}
# 更新段位
type Ranking {
isPlayRankUpdated: Boolean
playRank: Rank
}
# 段位
type Rank {
rank: Int
}
type AssessmentRecordWithRank {
player: Player
rank: Int
achievementRate: Float
result: Int
createTime: Date
}
type Player {
_id: String
username: String
highestGoldenMedalLevel: Int
RThisMonth: Int
}
type ReviewRequest {
set: ChartSet
isUnranked: Boolean
}
type PlayRecordWithRank {
player: Player
mod: PlayMod
rank: Int
score: Int
perfect: Int
good: Int
miss: Int
createTime: Date
}
# exchangeSet 返回信息
type Exchange {
coin: Int
}
input ChartSetAndVersion {
setId: String
version: Int
}
# refreshSet 返回值
# (本身应该与 ChartSet 相同,但是因为 noterName 不存在于 ChartSet,所以单独拉出来)
type Set {
_id: String
isRanked: Boolean
introduction: String
noterName: String
musicTitle: String
}
type Query {
# 后端测试(非原生内容)
hello: String!
# 请求玩家自身
self: Self
# 请求 Reviewer 玩家自身
reviewer: Reviewer
# 已经拥有的谱子
ownOrGotChart: [DetailedChart]
# 游戏内公告(尚未启用)
announcement(limit: Int, skip: Int): [Announcement!]
# 游戏元数据
gameSetting: GameSetting!
# 考级数据
assessmentGroup(limit: Int, skip: Int): [AssessmentGroup]
# ?
assessmentRank(
assessmentGroupId: String
medalLevel: Int
skip: NonNegativeInt
limit: NonNegativeInt
): [AssessmentRecordWithRank]
# 获取谱子(曲谱商店)
set(
playCountOrder: Int # {-1, 0}
publishTimeOrder: Int # {-1, 0}
limit: NonNegativeInt
skip: NonNegativeInt
isHidden: Int # {1(Hidden), -1(Other)}
musicTitle: String
isOfficial: Int # {1(Official), 0(Other)}
isRanked: Int # {1(Ranked), -1(Unranked), 0(Other)}
): [ChartSet]
# 获取谱子列表
# (暂时不知道具体用在哪里)
charts(limit: Int, skip: Int, ranked: Int): [DetailedChart]
# ?
playRank(
chartId: String
skip: NonNegativeInt
limit: NonNegativeInt
): [PlayRecordWithRank]
# ?
refreshSet(setVersion: [ChartSetAndVersion]): Set
# 根据 String 获取谱子
setById(_id: String): ChartSet
# 根据用户名获取用户信息
userByUsername(username: String): User
}
type Mutation {
# 考级开始前提交
submitBeforeAssessment(
assessmentGroupId: String
medalLevel: Int
): BeforePlaySubmit
# 考级结束后提交
submitAfterAssessment(
playRecords: [PlayRecordInput]
randomId: String
): AssessmentAfterPlaySubmit
# 游玩前提交
submitBeforePlay(
chartId: String
PPCost: Int
eventArgs: String
): BeforePlaySubmit
# 游玩后提交成绩
submitAfterPlay(randomId: String, playRecord: PlayRecordInput): AfterPlaySubmit
# ?
purchaseChart(chartId: String): User
# ?
exchangeSet(setId: String): Exchange
# 登录
loginUser(username: String, password: String): User
# 注册
registerUser(username: String, password: String): User
}
type Self {
# 获取拥有的谱子
gotSet: [ChartSet]
# ?
assessmentRankSelf(
assessmentGroupId: String
medalLevel: Int
): AssessmentRecordWithRank
# ?
playRankSelf(chartId: String): PlayRecordWithRank
}
type Reviewer {
# 获取需要 Review 的谱子
reviewRequest(
limit: Int
skip: Int
status: Int
searchStr: String
): [ReviewRequest]
}