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) {idnameparticipants(query: {}) {pageInfo {total}}}},{"tourneySlug":"shine-2018"}
Example #2 (specifying event(s))
- Request
- Response
query AttendeeCount($tourneySlug: String!, $eventIds: [ID]) {tournament(slug: $tourneySlug) {idnameparticipants(query: {filter: {eventIds:$eventIds}}) {pageInfo {total}}}},{"tourneySlug":"shine-2018","eventIds":[78790]}