Getting Started
Credential Advanced
- Overview
- API Credential
- REST Credential
- GraphQL Credential
- Contract Query Credential
GraphQL API
- Overview
- Quest
- Queries
- Examples
- Credential
- Space
Smart Contract
- Introduction
- Contracts
- Audit Reports
- Subgraph
Examples
QuestParticipants
Query campaign participants
Arguments:
Name | Description |
---|---|
id | Campaign hash id. |
pfirst | Query limit. |
pafter | Query offset. |
Request:
Copy
query campaignParticipants($id: ID!, $pfirst: Int!, $pafter: String!) {
campaign(id: $id) {
id
numberID
numNFTMinted
participants {
participants(first: $pfirst, after: $pafter) {
list {
address {
username
avatar
address
email
solanaAddress
aptosAddress
seiAddress
discordUserID
}
}
}
participantsCount
}
}
}
Variables:
Copy
{
"id": "GCn45UjHXE",
"pfirst": 1,
"pafter": "-1"
}
Response:
Copy
{
"data": {
"campaign": {
"id": "GCn45UjHXE",
"numberID": 151178,
"numNFTMinted": 0,
"participants": {
"participants": {
"list": [
{
"address": {
"username": "0xdoxes",
"avatar": "https://source.boringavatars.com/marble/120/blunder8888@gmail.com",
"address": "0x00000000ccd193975907ddb660b4692bb4257f9f",
"email": "",
"solanaAddress": "",
"aptosAddress": "",
"seiAddress": "",
"discordUserID": ""
}
}
]
},
"participantsCount": 234163
}
}
}
}
Copy
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'graphigo.prd.galaxy.eco',
'path': '/query',
'headers': {
'content-type': 'application/json',
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
query: `query campaignParticipants($id: ID!, $pfirst: Int!, $pafter: String!) {
campaign(id: $id) {
id
numberID
numNFTMinted
participants {
participantsCount
participants(first: $pfirst, after: $pafter) {
list {
points
address {
username
avatar
address
email
solanaAddress
aptosAddress
seiAddress
discordUserID
}
}
}
participantsCount
}
}
}`,
variables: {"id":"GCn45UjHXE","pfirst":1,"pafter":"-1"}
});
req.write(postData);
req.end();
Was this page helpful?
On this page
Assistant
Responses are generated using AI and may contain mistakes.