Leaderboard

GraphQL Endpoint to fetch the leaderboard of a quest or aggregated points for any quest participant.

GraphQL Query

query Leaderboard($activityTrackerId: Int!, $page: Int, $pageSize: Int) {
  leaderboard(activityTrackerId: $activityTrackerId, page: $page, pageSize: $pageSize) {
    activityTrackerId
    totalParticipants
    participants {
      walletAddress
      twitterId
      discordId
      email
      twitterUsername
      discordUsername
      points
      rank
    }
  }
}

Variables

{
    "pageSize": Int, // Number of events entries in a fetch. Upper limit = 100
    "page": Int, // Page number
    "activityTrackerId": Int // activity tracker id
}

Response

{
    "data": {
        "leaderboard": {
            "totalParticipants": Int, // Total number of participants in activity tracker
            "activityTrackerId": Int, // activity tracker id
            "leaderboardList": Array<{
                "walletAddress": String, // Wallet Address if available
                "twitterId": String, // twitter id if available
                "discordId": String, // discord id if available
                "email": String, // email address if available
                "twitterUsername": String, // Twitter username if available
                "discordUsername": String, // Discord username if available
                "points": Int, // Total points at the time of creation of the leaderboard
                "rank": Int, // Rank of the user on the leaderboard
            }>
        }
    }
}

Examples

POST https://dashboard.withblaze.app/api/graphql-api

Query Parameters

Name
Type
Description

page

1

pageSize

10

Max Limit - 100

activityTrackerId*

QUEST-ID

Required: Activity tracker id

If the quest ID is not specified, then the request will throw an error

Headers

Name
Type
Description

x-api-key*

API-KEY

Your Blaze API Key

Last updated