NYYU Logo
APIAvatar

Get Avatar Profiles

Retrieve all avatar profiles from the system

Get Avatar Profiles

Retrieve all available avatar profiles with complete metadata

Query

đŸ‘Ĩ
getAvatars
Retrieve all avatar profiles in the system

Schema

getAvatars: [AvatarProfile]

Parameters

â„šī¸
No Parameters Required

This query does not require any parameters and returns all available avatar profiles

Return Value

đŸ“Ļ
Returns Array of AvatarProfile Objects

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

AvatarProfile Fields

📋
Available Fields
Fields you can query from each AvatarProfile
Basic Information
id - Unique identifier
fname - First name
surname - Last name
details - Biography
Timestamps
regDate - Registration date
updateDate - Last update
deleted - Deletion flag
Visual Components
hairColor - Hair color
avatarSet - Component array
Metadata
skillSet - Skills array
factsSet - Facts array

Example

đŸ’ģ
Usage Example
Retrieving all avatar profiles
query {
  getAvatars {
    id
    fname
    surname
    hairColor
    details
    skillSet {
      id
      name
      rate
    }
    avatarSet {
      id
      groupId
      compId
    }
    factsSet {
      id
      topic
      detail
    }
    regDate
    updateDate
  }
}

Response Example

📤
Sample Response
Example of returned profile data
{
  "data": {
    "getAvatars": [
      {
        "id": 123,
        "fname": "Nicola",
        "surname": "Tesla",
        "hairColor": "Black",
        "details": "A visionary inventor known for contributions to AC electricity",
        "skillSet": [
          {
            "id": 1,
            "name": "Inventing",
            "rate": 5
          }
        ],
        "avatarSet": [
          {
            "id": 10,
            "groupId": "engineers",
            "compId": 101
          }
        ],
        "factsSet": [
          {
            "id": 1,
            "topic": "Achievements",
            "detail": "Developed the modern AC electricity supply system"
          }
        ],
        "regDate": 1625247600000.0,
        "updateDate": 1625334000000.0
      },
      {
        "id": 124,
        "fname": "Marie",
        "surname": "Curie",
        "hairColor": "Brown",
        "details": "Pioneering physicist and chemist",
        "skillSet": [
          {
            "id": 2,
            "name": "Physics",
            "rate": 5
          }
        ],
        "avatarSet": [],
        "factsSet": [],
        "regDate": 1625248000000.0,
        "updateDate": 1625335000000.0
      }
    ]
  }
}

Use Cases

📚
Avatar Gallery

Display all available avatar profiles in a gallery or catalog view

🎭
Character Selection

Allow users to browse and select from predefined avatar characters

🔍
Search & Filter

Build searchable directories with filtering by skills, facts, or attributes

📊
Analytics & Reporting

Analyze avatar profile data for insights and statistics

Filtering & Pagination

âš ī¸
Performance Considerations
Handle large datasets efficiently
Client-Side Filtering

Apply filters on the client side after fetching data (suitable for small datasets)

Result Caching

Cache results to reduce server load and improve response times

Selective Field Queries

Only query fields you need to reduce payload size

Common Filters

🔧
Client-Side Filtering Patterns
Common ways to filter avatar profiles
By Name
Search fname or surname
By Skill
Filter by skill name or rating
By Hair Color
Group by hairColor attribute
By Date
Sort by regDate or updateDate
💡
Best Practice
For large datasets, consider implementing server-side pagination and filtering for better performance