-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphqls
632 lines (474 loc) · 14.5 KB
/
schema.graphqls
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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
"A player's UUID."
scalar UUID
@spectaql(options: [{ key: "example", value: "6a085b2c-19fb-4986-b453-231aa942bbec" }])
@specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
"An RFC-3339 compliant date time."
scalar DateTime
@spectaql(options: [{ key: "example", value: "1996-12-19T16:39:57-08:00" }])
@specifiedBy(url: "https://scalars.graphql.org/andimarek/date-time.html")
"An RFC-3339 compliant date."
scalar Date
@spectaql(options: [{ key: "example", value: "1996-12-19", }])
@specifiedBy(url: "https://tools.ietf.org/html/rfc3339")
"A fish."
type Fish {
"The name of the fish."
name: String!
@spectaql(options: [{ key: "example", value: "Midnight Tang" }])
"The climate this fish can be found in."
climate: String!
@spectaql(options: [{ key: "example", value: "Temperate" }])
"The collection this fish can be found in."
collection: String!
@spectaql(options: [{ key: "example", value: "Dark Grove" }])
"The rarity of the fish."
rarity: Rarity!
"The time this fish can be caught."
catchTime: FishCatchTime!
"If this fish is elusive."
elusive: Boolean!
"The number of trophies awarded for catching this fish in a given weight."
trophies(weight: FishWeight!): Int
}
"The time a fish can be caught in."
enum FishCatchTime {
"The fish can always be caught."
ALWAYS
"The fish can only be caught during daytime."
DAY
"The fish can only be caught during nighttime."
NIGHT
}
"""
The weight of a fish.
Note that some weights are not used for crabs, or are only used for crabs.
"""
enum FishWeight {
"Average."
AVERAGE
"Large."
LARGE
"""
Massive.
This weight is not used for crabs.
"""
MASSIVE
"""
Gargantuan.
This weight is not used for crabs.
"""
GARGANTUAN
"""
Colossal.
This weight is only used for crabs.
"""
COLOSSAL
}
"A record of the weight of fish that have been caught."
type FishRecord {
"The fish this record is for."
fish: Fish!
"A list of data about the weights that have been caught."
weights: [FishCaughtWeight!]!
}
"Data about a caught fish weight."
type FishCaughtWeight {
"The weight that was caught."
weight: FishWeight!
"When the player first caught this weight."
firstCaught: Date!
}
"A rank."
enum Rank {
"The Champ rank."
CHAMP
"The Grand Champ rank."
GRAND_CHAMP
"The Grand Champ Royale rank."
GRAND_CHAMP_ROYALE
"The Creator rank."
CREATOR
"The Contestant rank."
CONTESTANT
"The Moderator rank."
MODERATOR
"The Noxcrew rank."
NOXCREW
}
"The categories for trophies."
enum TrophyCategory {
"Style trophies."
STYLE
"Skill trophies."
SKILL
"Angler trophies."
ANGLER
}
"Data for types that track some form of progression."
type ProgressionData {
"The amount obtained."
obtained: Int!
"The amount that can be obtained."
obtainable: Int!
}
"Data on the amount of trophies a user has/can have."
type TrophyData {
"The amount of trophies obtained."
obtained: Int!
"The maximum amount of trophies that can be obtained."
obtainable: Int!
"The amount of bonus trophies."
bonus: Int!
}
"Data relating to a level."
type LevelData {
"The overall level."
level: Int!
"The zero-indexed evolution of the level."
evolution: Int!
"The next level that will have an evolution, if any."
nextEvolutionLevel: Int
"The progress the player is making towards their next level, if any."
nextLevelProgress: ProgressionData
}
"A Crown Level and associated trophy data."
type CrownLevel {
"The overall Crown Level."
level: Int!
@deprecated(reason: "Use levelData instead.")
"The zero-indexed evolution of the crown."
evolution: Int!
@deprecated(reason: "Use levelData instead.")
"The next level that the crown will evolve, if any."
nextEvolutionLevel: Int
@deprecated(reason: "Use levelData instead.")
"The progress the player is making towards their next level, if any."
nextLevelProgress: ProgressionData
@deprecated(reason: "Use levelData instead.")
"The overall level data."
levelData: LevelData!
"The fishing level data."
fishingLevelData: LevelData!
"The amount of trophies the player has."
trophies(
category: TrophyCategory = null
): TrophyData!
}
"The status of a player's MCC+ subscription."
type MCCPlusStatus {
"The current evolution index for MCC+ icon."
evolution: Int!
"The instant they started their current streak."
streakStart: DateTime!
"The total number of days they have been subscribed for."
totalDays: Int!
}
"A player who has logged in to MCC Island."
type Player {
"The player's Minecraft UUID in dashed format."
uuid: UUID!
"The player's username, if known."
username: String
@spectaql(options: [{ key: "example", value: "LadyAgnes" }])
"The ranks which the user is associated with, if any."
ranks: [Rank!]!
"The player's MCC+ status, if currently subscribed."
mccPlusStatus: MCCPlusStatus
"The player's Crown Level and associated trophy data."
crownLevel: CrownLevel!
"""
The current status of the player.
This method is conditional on the player having the in-game "status" API setting enabled.
"""
status: Status
"""
Collections data for the player.
This method is conditional on the player having the in-game "collections" API setting enabled.
"""
collections: Collections
"""
Social data for the player.
This method is conditional on the player having the in-game "social" API setting enabled.
"""
social: Social
"""
Statistics data for the player.
This method is conditional on the player having the in-game "statistics" API setting enabled.
"""
statistics: Statistics
}
"Social data."
type Social {
"A list of the player's friends."
friends: [Player!]!
"The player's party."
party: Party!
}
"Collections data."
type Collections {
"The player's earned currency."
currency: Currency!
"A list of cosmetics the player currently has equipped."
equippedCosmetics: [Cosmetic!]!
"Returns the ownership state of all cosmetics, optionally in a category and/or collection."
cosmetics(
category: CosmeticCategory = null,
collection: String = null
@spectaql(options: { key: "example", value: "Oceanic" })
): [CosmeticOwnershipState!]!
"Returns the record data for all fish, optionally in a specific collection."
fish(
collection: String = null
@spectaql(options: [{ key: "example", value: "Dark Grove" }])
): [FishRecord!]!
}
"The ownership state of a cosmetic."
type CosmeticOwnershipState {
"The cosmetic in question."
cosmetic: Cosmetic!
"If the cosmetic is owned."
owned: Boolean!
"The Chroma Packs that have applied to this cosmetic, if it is colorable."
chromaPacks: [String!]
@spectaql(options: { key: "example", value: "[\"oceanic\", \"natural\"]" })
"The number of Royal Reputation donations that have been made of this cosmetic, if it can be donated."
donationsMade: Int
}
"A player's earned currency."
type Currency {
"The number of coins the player currently has."
coins: Int!
"The number of gems the player currently has."
gems: Int!
@deprecated(reason: "Deprecated for removal. Will always return 0 until removal.")
"The number of Royal Reputation the player currently has."
royalReputation: Int!
"The number of silver the player currently has."
silver: Int!
"The number of material dust the player currently has."
materialDust: Int!
"The number of A.N.G.L.R. Tokens the player currently has."
anglrTokens: Int!
}
"A player's current status."
type Status {
"Whether the player is online or not."
online: Boolean!
"The player's current server, populated if they are online."
server: Server
"When the player first joined MCC Island, if known."
firstJoin: DateTime
"When the player most recently joined MCC Island, if known."
lastJoin: DateTime
}
"The category of a server."
enum ServerCategory {
"A lobby server."
LOBBY
"A game server."
GAME
"A limbo server."
LIMBO
"A queue server"
QUEUE
}
"A game."
enum Game {
"Hole in the Wall."
HOLE_IN_THE_WALL
"To Get To The Other Side (TGTTOS)."
TGTTOS
"Battle Box."
BATTLE_BOX
"Sky Battle."
SKY_BATTLE
"Parkour Warrior."
PARKOUR_WARRIOR
"Dynaball."
DYNABALL
"Rocket Spleef."
ROCKET_SPLEEF
}
"A server on the network."
type Server {
"The category of the server."
category: ServerCategory!
@spectaql(options: [{ key: "example", value: "GAME" }])
"The sub-type of the server that can hold additional information about the server."
subType: String!
@spectaql(options: [{ key: "example", value: "daily" }])
"The game associated with this server, if any."
associatedGame: Game
@spectaql(options: [{ key: "example", value: "PARKOUR_WARRIOR" }])
}
"A player's status within a party."
type Party {
"Whether the player is in an active party."
active: Boolean!
"The leader of the party, populated if the party exists."
leader: Player
"The members of the party, populated if the party exists."
members: [Player!]
}
"Statistic-related data."
type Statistics {
"""
Returns the value stored for the given statistic in a rotation.
The returned number will be `null` if the statistic does not track in the provided rotation, or if the statistic doesn't exist.
"""
rotationValue(
statisticKey: String!
@spectaql(options: [{ key: "example", value: "games_played" }]),
rotation: Rotation! = LIFETIME,
): Int
}
"A statistic."
type Statistic {
"The key of the statistic."
key: String!
@spectaql(options: [{ key: "example", value: "games_played" }])
"If this statistic generates leaderboards."
forLeaderboard: Boolean!
"""
The rotations for which this statistic is tracked.
These are the rotations that can be used to generate leaderboards or fetch rotation values.
Note that the `YEARLY` rotation never generates leaderboards, even if it is returned in this list.
"""
rotations: [Rotation!]!
"""
Returns the leaderboard for this statistic in a given rotation.
If this statistic does not generate leaderboards, or the statistic is not tracked for the provided rotation, this will return `null`.
"""
leaderboard(
rotation: Rotation! = LIFETIME,
amount: Int! = 10,
): [LeaderboardEntry!]
}
"An entry in a leaderboard."
type LeaderboardEntry {
"""
The player who has this entry.
This will be `null` if the player does not have the statistics enabled for the API.
However, for Crown Level or Trophy count leaderboards, the player will not be `null`.
"""
player: Player
"The rank for this entry."
rank: Int!
"The value for this entry."
value: Int!
}
"The result of fetching a value of a statistic."
type StatisticValueResult {
"The statistic."
statistic: Statistic!
"The value."
value: Int!
}
"""
A rotation period.
Each period resets at 10AM UTC.
"""
enum Rotation {
"A daily rotation that resets."
DAILY
"A weekly rotation that resets on Tuesdays."
WEEKLY
"A monthly rotation that resets on the first day of every month."
MONTHLY
"A yearly rotation that resets on the first day of every year."
YEARLY
"A lifetime rotation; a rotation period used to indicate something never rotates."
LIFETIME
}
"Different categories of cosmetics."
enum CosmeticCategory {
"Hats."
HAT
"Hair."
HAIR
"Accessories."
ACCESSORY
"Auras."
AURA
"Trails."
TRAIL
"Cloaks."
CLOAK
"Fishing rods."
ROD
}
"Different tiers of rarity."
enum Rarity {
"Common."
COMMON
"Uncommon."
UNCOMMON
"Rare."
RARE
"Epic."
EPIC
"Legendary."
LEGENDARY
"Mythic."
MYTHIC
}
"A cosmetic."
type Cosmetic {
"The name of the cosmetic."
name: String!
"The category the cosmetic is in."
category: CosmeticCategory!
"The collection this cosmetic is in."
collection: String!
"The rarity of the cosmetic."
rarity: Rarity!
"If this cosmetic can be colored using Chroma Packs."
colorable: Boolean!
"""
The number of trophies this cosmetic awards.
Note that this does not include the completion bonus for applying all Chroma Packs to the cosmetic.
"""
trophies: Int!
"""
If this cosmetic awards bonus trophies.
This will be `null` if the cosmetic does not award any trophies.
"""
isBonusTrophies: Boolean
"If this cosmetic can be donated for Royal Reputation."
canBeDonated: Boolean!
}
"Available queries."
type Query {
"Given a UUID, returns a Player if they have logged in to MCC Island."
player(uuid: UUID!): Player
"""
Given a username, returns a Player object if they have logged into MCC Island with this username.
This method may not return a player that has this username if they have not logged in recently enough for us
to verify that the player still owns this username.
"""
playerByUsername(
username: String!
@spectaql(options: [{ key: "example", value: "LadyAgnes" }])
): Player
"Returns a list of all known statistics."
statistics: [Statistic!]!
"Returns a statistic by it's name."
statistic(
key: String!
@spectaql(options: [{ key: "example", value: "games_played" }])
): Statistic
"""
Returns when this rotation will next rotate.
If the rotation is due the exact time this method is called, this method will return the next time that it will rotate.
"""
nextRotation(rotation: Rotation!): DateTime!
"""
Returns when this rotation last rotated.
If the rotation is due the exact time this method is called, this method will return the current time.
"""
previousRotation(rotation: Rotation!): DateTime!
}
"Internal directive used to generate some documentation elements."
directive @spectaql(options: [SpectaQLOption]) on QUERY | MUTATION | SUBSCRIPTION | FIELD | FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | VARIABLE_DEFINITION | SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
"Internal key/value pair for documentation options."
input SpectaQLOption { key: String!, value: String! }