From a135778d48753dbbb22a0dcea16a4517f50868fa Mon Sep 17 00:00:00 2001 From: Kezz Date: Fri, 6 Dec 2024 16:30:48 +0000 Subject: [PATCH] feature: Cosmetics and ownership state --- schema.graphqls | 78 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/schema.graphqls b/schema.graphqls index 5c0491f..15cb8cd 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -142,6 +142,25 @@ type Social { type Collections { "The player's earned currency." currency: Currency! + + "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!]! +} + +"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!] } "A player's earned currency." @@ -160,7 +179,7 @@ type Currency { "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! } @@ -343,6 +362,63 @@ enum Rotation { LIFETIME } +"Different categories of cosmetics." +enum CosmeticCategory { + "Hats." + HAT + + "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 rarity of the cosmetic." + rarity: Rarity! + + "If this cosmetic can be colored using Chroma Packs." + colorable: Boolean! +} + "Available queries." type Query { "Given a UUID, returns a Player if they have logged in to MCC Island."