NYYU Logo
APIAvatar

Get Avatar Components

Retrieve all available avatar components from the system

Get Avatar Components

Retrieve all available avatar components for customization

Query

🎨
getAvatarComponents
Retrieve all avatar components in the system

Schema

getAvatarComponents: [AvatarComponent]

Parameters

â„šī¸
No Parameters Required

This query does not require any parameters and returns all available components

Return Value

đŸ“Ļ
Returns Array of AvatarComponent Objects

The query returns a list of all AvatarComponent objects available in the system

AvatarComponent Fields

📋
Available Fields
Fields you can query from each AvatarComponent
Identity
groupId - Component category
compId - Unique component ID
Access Control
tierLevel - Required tier
price - Token cost
Inventory
limited - Maximum available
purchased - Already sold
Visual Properties
svg - SVG content
width - Component width
top, left - Positioning

Example

đŸ’ģ
Usage Example
Retrieving all avatar components
query {
  getAvatarComponents {
    groupId
    compId
    tierLevel
    price
    limited
    purchased
    svg
    width
    top
    left
  }
}

Response Example

📤
Sample Response
Example of returned component data
{
  "data": {
    "getAvatarComponents": [
      {
        "groupId": "hats",
        "compId": 1,
        "tierLevel": 1,
        "price": 5.0,
        "limited": 100,
        "purchased": 45,
        "svg": "<svg>...</svg>",
        "width": 30,
        "top": 5,
        "left": 10
      },
      {
        "groupId": "accessories",
        "compId": 2,
        "tierLevel": 2,
        "price": 10.0,
        "limited": 50,
        "purchased": 12,
        "svg": "<svg>...</svg>",
        "width": 20,
        "top": 15,
        "left": 5
      }
    ]
  }
}

Use Cases

đŸ›ī¸
Component Marketplace

Display all available components in a marketplace or shop interface

🎨
Avatar Builder

Provide component options in avatar customization tools

📊
Inventory Management

Track component availability, sales, and scarcity

💎
Tier Filtering

Filter components by user tier level and pricing

Filtering Tips

🔧
Client-Side Filtering
Common filtering patterns for component lists
By Category (groupId)

Filter components by category like "hats", "accessories", "clothing"

By Availability

Show only components where purchased < limited

By Tier Level

Filter components accessible to the current user's tier

By Price Range

Filter components within a specific price range

💡
Performance Tip
Consider caching this query result as component catalogs don't change frequently