NYYU Logo
APIAvatar

Get Avatar By ID

Retrieve avatar profiles by unique identifier

Get Avatar By ID

Retrieve complete avatar profile information using a unique identifier

Query

🔍
getAvatar
Retrieve an avatar profile by its unique ID

Schema

getAvatar(
  id: Int!
): AvatarProfile

Parameters

idRequired
Type: Int!
The unique ID of the avatar profile to retrieve

Return Value

📦
Returns AvatarProfile Object

The query returns an AvatarProfile object that corresponds to the specified ID

AvatarProfile Fields

📋
Available Fields
Fields you can query from the AvatarProfile
Basic Information
id - Unique identifier
fname - First name
surname - Last name
details - Profile description
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 a complete avatar profile
query {
  getAvatar(id: 123) {
    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 AvatarProfile data
{
  "data": {
    "getAvatar": {
      "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
        },
        {
          "id": 2,
          "name": "Electrical Engineering",
          "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
    }
  }
}

Use Cases

👤
Profile Display

Fetch complete user avatar information for profile pages and user interfaces

🎨
Avatar Rendering

Retrieve component sets to render the visual representation of the avatar

Skills Analysis

Access skill ratings for gamification, achievements, or leaderboard features

📊
Data Analytics

Retrieve avatar metadata for analysis and reporting purposes

💡
Performance Tip
Only query the fields you need to optimize response size and query performance