Attendee Counts
In this example, we will query for the number of attendees (participants) in a tournament. Optionally, we can include an array of eventIds to specify a count for a particular subset of events in that tournament.
Example #1
- Request
- Response
query AttendeeCount($tourneySlug: String!) {
tournament(slug: $tourneySlug) {
id
name
participants(query: {}) {
pageInfo {
total
}
}
}
},
{
"tourneySlug":"shine-2018"
}
{
"data": {
"tournament": {
"name": "Shine 2018",
"participants": {
"pageInfo": {
"total": 1764
}
}
}
},
"actionRecords": []
}
Example #2 (specifying event(s))
- Request
- Response
query AttendeeCount($tourneySlug: String!, $eventIds: [ID]) {
tournament(slug: $tourneySlug) {
id
name
participants(query: {
filter: {
eventIds:$eventIds
}
}) {
pageInfo {
total
}
}
}
},
{
"tourneySlug":"shine-2018",
"eventIds":[78790]
}
{
"data": {
"tournament": {
"name": "Shine 2018",
"participants": {
"pageInfo": {
"total": 904
}
}
}
},
"actionRecords": []
}