Documentation Index
Fetch the complete documentation index at: https://docs.galxe.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Quest API provides access to quest information, user eligibility verification, and quest metadata.
Core Queries
Get Quest Details
query GetQuest($id: ID!) {
quest(id: $id) {
id
name
type
status
description
startTime
endTime
cap
participantsCount
loyaltyPoints
gasType
space {
id
name
}
chain
}
}
List Space Quests
query GetSpaceQuests($input: ListQuestInput!) {
quests(input: $input) {
totalCount
pageInfo {
hasNextPage
endCursor
}
list {
id
name
type
status
participantsCount
loyaltyPoints
startTime
endTime
}
}
}
Variables:
{
"input": {
"spaceId": "40",
"statuses": ["Active", "NotStarted"],
"types": ["Drop", "Points"],
"first": 20
}
}
Check User Eligibility
query CheckQuestEligibility($questId: ID!, $address: String!) {
quest(id: $questId) {
id
name
status
credentialGroups(address: $address) {
id
name
conditionRelation
conditions {
expression
eligible
}
rewards {
expression
eligible
rewardType
rewardCount
}
}
}
}
When all conditions.eligible are true, the user meets quest requirements.
Field Reference
Quest Status
| Status | Description |
|---|
Draft | Quest in development, not visible |
Active | Quest is live and accepting participants |
NotStarted | Quest scheduled but not started |
Expired | Quest period has ended |
CapReached | Maximum participants reached |
Deleted | Quest has been removed |
Quest Types
| Type | Description |
|---|
Drop | Standard quest with rewards |
MysteryBox | Random reward quest |
Airdrop | Token distribution quest |
Points | Loyalty points reward |
ExternalLink | External website integration |
Gas Types
| Type | Description |
|---|
Gas | User pays gas fees |
Gasless | Galxe covers gas fees |
Key Fields
| Field | Type | Description |
|---|
id | ID! | Quest’s unique hash ID |
name | String! | Quest display name |
status | QuestStatus! | Current quest status |
participantsCount | Int! | Number of participants |
loyaltyPoints | Int! | Points awarded for completion |
credentialGroups(address) | [CredentialGroup] | User-specific eligibility data |
Integration Patterns
Basic Quest Validation
curl -X POST https://graphigo-business.prd.galaxy.eco/query \
-H "Content-Type: application/json" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-d '{
"query": "query GetQuest($id: ID!) { quest(id: $id) { name status participantsCount cap loyaltyPoints } }",
"variables": { "id": "GChdWUjXX3" }
}'
Quest Status Validation
Check these conditions before allowing participation:
status must be "Active"
participantsCount must be less than cap (if cap > 0)
- Current time must be between
startTime and endTime
User Eligibility Flow
- Call
credentialGroups(address: $userAddress)
- Check each group’s
conditions.eligible values
- If
conditionRelation is "ALL", all conditions must be true
- If
conditionRelation is "ANY", at least one condition must be true
Best Practices
- Status Validation: Always check quest status before showing participation UI
- Capacity Check: Verify
participantsCount < cap for available spots
- Time Validation: Ensure current time is within quest period
- Error Handling: Handle quest not found and permission errors
- Caching: Cache quest details for 1-5 minutes to reduce API calls
Common Errors
| Error | Cause | Solution |
|---|
Quest not found | Invalid quest ID | Verify quest ID exists |
Quest is private | No access permissions | Check quest permissions |
Rate limit exceeded | Too many requests | Implement retry logic |
Invalid status filter | Wrong enum value | Use valid status values |
Next Steps