Update User Tier
Modify existing tier configurations in the gamification system (Admin only)
Update User Tier
ADMIN
Modify tier names, points, or badges
Admin Access Required
This mutation is accessible only to users with ADMIN privileges. Changes affect all users at that tier level.
Overview
The updateUserTier
mutation allows administrators to modify existing tier configurations. Update tier names, adjust point requirements, or refresh badge designs while preserving the tier level identifier.
GraphQL Schema
updateUserTier(
level: Int!
name: String
point: Float
svg: String
): Tier
Parameters
level
The level identifier of the tier to update. Cannot be changed.
name
New display name for the tier (e.g., "Elite Bronze", "Premium Silver").
point
Updated point threshold (e.g., adjust from 1000.0 to 1200.0).
svg
Updated SVG markup for refreshed badge design.
Return Type
type Tier {
level: Int!
name: String
point: Float
svg: String
}
Example Mutations
Update Tier Name
mutation {
updateUserTier(
level: 1
name: "Elite Bronze"
) {
level
name
point
svg
}
}
Adjust Point Requirement
mutation {
updateUserTier(
level: 2
point: 6000.0
) {
level
name
point
}
}
Complete Update
mutation {
updateUserTier(
level: 3
name: "Premium Gold"
point: 20000.0
svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='#FFD700' d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/></svg>"
) {
level
name
point
svg
}
}
Example Response
{
"data": {
"updateUserTier": {
"level": 1,
"name": "Elite Bronze",
"point": 1000,
"svg": "<svg>...</svg>"
}
}
}
Use Cases
Adjust point thresholds based on user progression data and engagement metrics
Update badge designs to match new branding or seasonal themes
Rename tiers to better reflect platform identity or user feedback
Correct typos or fix improperly configured tier settings
Best Practices
Notify users before making significant point requirement changes that might affect their current tier status
Ensure updated point values maintain proper progression order (tier N+1 should always require more points than tier N)
Validate SVG badges render correctly across all platforms before deploying updates
Use analytics to inform point threshold changes - adjust based on actual user distribution and engagement patterns
Only include fields you want to change - omitted fields will retain their current values
Implementation Example
// Fetch current tier configuration
const { data: currentTiers } = await client.query({
query: gql`
query GetTiers {
getUserTiers {
level
name
point
}
}
`
});
// Validate new point value
const validatePointUpdate = (level: number, newPoint: number) => {
const sortedTiers = currentTiers.getUserTiers.sort(
(a, b) => a.level - b.level
);
const prevTier = sortedTiers.find(t => t.level === level - 1);
const nextTier = sortedTiers.find(t => t.level === level + 1);
if (prevTier && newPoint <= prevTier.point) {
throw new Error(`Point value must be greater than ${prevTier.name} (${prevTier.point})`);
}
if (nextTier && newPoint >= nextTier.point) {
throw new Error(`Point value must be less than ${nextTier.name} (${nextTier.point})`);
}
return true;
};
// Update tier with validation
try {
validatePointUpdate(2, 6000);
const { data } = await client.mutate({
mutation: gql`
mutation UpdateTier($level: Int!, $point: Float) {
updateUserTier(level: $level, point: $point) {
level
name
point
}
}
`,
variables: {
level: 2,
point: 6000
}
});
console.log(`Updated tier: ${data.updateUserTier.name} to ${data.updateUserTier.point} points`);
} catch (error) {
console.error('Update failed:', error.message);
}
Impact Considerations
Users currently at this tier may drop to a lower tier if they don't meet the new requirement
More users may become eligible for this tier, potentially reducing its prestige
Update all UI references and user communications to reflect new tier names
Users will see new badges immediately - ensure designs are production-ready
Related Operations
User Tier Overview
Learn about tier types and structures
Get User Tiers
Retrieve all tier configurations
Add New Tier
Create new tier level (Admin)
Delete User Tier
Remove tier level (Admin)
System-Wide Changes
Updates to tier configurations affect all users at that tier level. Plan changes carefully and communicate with your user base.