Get Avatar Components By Sets
Retrieve avatar components based on specific component sets
Get Components By Sets
Retrieve avatar components based on a provided component set
Query
Schema
getAvatarComponentsBySet(
set: [AvatarSetInput]
): [AvatarComponent]Parameters
setOptional[AvatarSetInput]groupId (String) - The group ID of the componentcompId (Int) - The component IDReturn Value
The query returns a list of AvatarComponent objects that match the provided set
Example
query {
getAvatarComponentsBySet(
set: [
{ groupId: "engineers", compId: 101 }
{ groupId: "hats", compId: 5 }
{ groupId: "accessories", compId: 12 }
]
) {
groupId
compId
tierLevel
price
limited
purchased
svg
width
top
left
}
}Response Example
{
"data": {
"getAvatarComponentsBySet": [
{
"groupId": "engineers",
"compId": 101,
"tierLevel": 2,
"price": 15.0,
"limited": 100,
"purchased": 45,
"svg": "<svg>...</svg>",
"width": 30,
"top": 10,
"left": 15
},
{
"groupId": "hats",
"compId": 5,
"tierLevel": 1,
"price": 8.0,
"limited": 200,
"purchased": 78,
"svg": "<svg>...</svg>",
"width": 35,
"top": 5,
"left": 12
},
{
"groupId": "accessories",
"compId": 12,
"tierLevel": 3,
"price": 20.0,
"limited": 50,
"purchased": 23,
"svg": "<svg>...</svg>",
"width": 25,
"top": 18,
"left": 8
}
]
}
}Use Cases
Retrieve all components needed to render a complete avatar
Analyze component combinations used by specific avatars
Calculate total value of components in an avatar profile
Verify component existence and availability before assignment
Query Behavior
Retrieves full component details for multiple groupId/compId pairs at once
Only returns components that exactly match the provided groupId and compId combinations
If a component in the set doesn't exist, it's simply excluded from results
Results typically maintain the order of the input set
Practical Example
Query getAvatar to retrieve profile with avatarSet field
Pull groupId and compId values from avatarSet array
Use getAvatarComponentsBySet to get SVG, positioning, and metadata
Use SVG and positioning data to compose the complete avatar visual