APIAvatar
Create New Avatar Profile
Create complete avatar profiles with skills, components, and facts
Create Avatar Profile
Build complete avatar profiles with skills, components, and personal details
🔐
Admin Access Required
This mutation is accessible only to users with ADMIN privileges
Mutation
✨
createNewAvatar
Create a comprehensive avatar profile with metadata
Schema
createNewAvatar(
fname: String!
surname: String!
skillSet: [SkillSetInput]!
avatarSet: [AvatarSetInput]
factsSet: [FactsInput]
hairColor: String
details: String
): AvatarProfileParameters
fnameRequiredType:
String!The first name of the avatar profile
surnameRequiredType:
String!The surname of the avatar profile
skillSetRequiredType:
[SkillSetInput]!List of skills for the avatar profile. Each skill includes:
•
name (String) - The name of the skill•
rate (Int) - Star rating for the skill (1-5)avatarSetOptionalType:
[AvatarSetInput]List of avatar components. Each component includes:
•
groupId (String) - Component category•
compId (Int) - Component unique IDfactsSetOptionalType:
[FactsInput]List of interesting facts about the avatar. Each fact includes:
•
topic (String) - The topic of the fact•
detail (String) - Detailed contenthairColorOptionalType:
StringThe hair color of the avatar
detailsOptionalType:
StringAdditional details and description about the avatar
Return Value
📦
Returns AvatarProfile Object
The mutation returns the newly created AvatarProfile if successful, otherwise null
Example
💻
Usage Example
Creating a historical figure avatar profile
mutation {
createNewAvatar(
fname: "Nicola"
surname: "Tesla"
skillSet: [
{ name: "Inventing", rate: 5 }
{ name: "Electrical Engineering", rate: 5 }
]
avatarSet: [
{ groupId: "engineers", compId: 101 }
]
factsSet: [
{
topic: "Achievements",
detail: "Developed the modern AC electricity supply system"
}
]
hairColor: "Black"
details: "A visionary inventor known for his contributions to the development of alternating current (AC) power systems."
) {
id
fname
surname
skillSet {
name
rate
}
avatarSet {
groupId
compId
}
factsSet {
topic
detail
}
hairColor
details
}
}Profile Components
🎯
Profile Structure
Understanding avatar profile components
Personal Info
• First & last name
• Physical attributes
• Biography details
Skills & Abilities
• Skill name
• Star rating (1-5)
• Multiple skills
Visual Elements
• Avatar components
• Hair color
• Custom accessories
💡
Best Practices
Create meaningful skill sets that reflect the avatar's character and use facts to add depth and personality