Tournaments by Location

In these examples, we will query for tournaments in a given location!

Example #1 (by Country)

  • Request
  • Response
query TournamentsByCountry($cCode: String!, $perPage: Int!) {
tournaments(query: {
perPage: $perPage
filter: {
countryCode: $cCode
}
}) {
nodes {
id
name
countryCode
}
}
},
{
"cCode": "JP",
"perPage": 4
}

Example #2 (by State)

To be clear, 'State' in this context means like 'United States' like California, Georgia, etc. State abbreviations can be found on external sites like this UPS resource.

  • Request
  • Response
query TournamentsByState($perPage: Int, $state: String!) {
tournaments(query: {
perPage: $perPage
filter: {
addrState: $state
}
}) {
nodes {
id
name
addrState
}
}
},
{
"perPage": 4,
"state": "CT"
}

Example #3 (by coordinates + radius distance)

  • Request
  • Response
query SocalTournaments($perPage: Int, $coordinates: String!, $radius: String!) {
tournaments(query: {
perPage: $perPage
filter: {
location: {
distanceFrom: $coordinates,
distance: $radius
}
}
}) {
nodes {
id
name
city
}
}
},
{
"perPage": 4,
"coordinates": "33.7454725,-117.86765300000002",
"radius": "50mi"
}