Pets
Queries
pet
petReturns a single Pet according to its id.
pet(id: ID!): Petpets
petsReturns multiple Pets according to the arguments passed.
pets(
skip: Int
first: Int
orderBy: PetOrderBy
orderDirection: OrderDirection
where: PetFilter
): [Pet]!Object Types
Pet
PetThe Pet object type contains the following fields:
Basic Information
id:ID- the Pet's ID. Crystalvale Pet IDs are padded by1000000000000(one trillion), and Serendale (Klaytn) IDs are padded by2000000000000(two trillion).normalizedId:String- the ID that appears in-game without realm padding.owner:Profile- the current owner of the Pet. Pets held in the PetAuction contract will still return the Profile of their owner.previousOwner:Profile- the most immediate recent owner of the Pet. Will returnnullif the Pet has not changed wallets since hatching.creator:Profile- the player who originally hatched the PetcreatedAt:Int- the Unix timestamp of the Pet's hatchingoriginId:Int- deprecatedoriginRealm:String- the origin realm of the Pet; returnsSER1,CRY, orSER2currentRealm:String- the current realm of the Pet; returnsSER1,CRY, orSER2name:String- not currently in useseason:Int- returns the Pet's Season numbereggType:Int- returns0for Blue Egg and1for Grey Egg. The Pet'seggTypedetermines the type of Profession Bonus that it will receive.rarity:Int- maps from0(Common) to4(Mythic)element:Int- maps from0to7- multiply by 2 and use the Hero element mapping. The Pet'selementdetermines the type of Crafting Bonus that it may receive.appearance:Int- a mapping of the appearance of the Pet; combines witheggTypeandseasonto determine Name, Variant, Family, and other detailsbackground:Int- a mapping of the background image for the Petshiny:Boolean- whether the Pet card is Shiny or not
Bonuses
Until specific bonuses are implemented, the number of stars on the Pet card maps as follows for the Rarity of each bonus:
0: no stars / no bonus1: 1 star / Common bonus80: 2 stars / Rare bonus160: 3 stars / Mythic bonus
The three Scalar fields for craftBonus and combatBonus are not currently in use, but will indicate the scale of the specific bonus.
bonusCount:Int- the number of bonuses that the Pet received
The profBonus field is padded by 10000 * eggType, as outlined here.
profBonus:IntprofBonusScalar:Int
The craftBonus field is padded by 10000 * element, as outlined here.
craftBonus:IntcraftBonusScalar:IntcombatBonus:IntcombatBonusScalar:Int
Pet State
hungryAt:Int- the Unix timestamp when the Pet will need to be fed to provide its bonuses to a Hero; not currently in useequippableAt:Int- the Unix timestamp when the Pet will be available for equipping to a Hero; not currently in useequippedTo:Hero- the Hero that the Pet is equipped to; not currently in usefedBy:Profile- the Profile that last fed the PetfoodType:Int- range of0-4, indicating Pet Treat Type (0: Regular;1: Premium), and presence of the Premium Provisions Power-Up (2: Regular + PU;3: Premium + PU)
Auction Details
saleAuction:PetAuction- if the Pet has been placed for Sale, returns the correspondingPetAuctionsalePrice:String- if the Pet has been placed for Sale, returns the Sale price in weiprivateAuctionProfile:Profile- if the Pet has been placed for Private Sale, returns the correspondingProfileof the future buyer
Examples
Example 1
All Uncommon Pets hatched from Grey Eggs with a two-star Armorsmithing bonus:
Example 2
All Pets from the Penguin family (by eggType/Appearance) with the "Vithraven Outskirts" background, sorted by ascending Sale Price:
Example 3
The 10 lowest-priced Rare Pets for Sale, sorted by ascending Sale Price:
Because Auction and PetAuction queries can't filter on subfields of tokenId, use complex Heroes and Pets queries with a salePrice_not: null filter instead.
Last updated