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: $perPagefilter: {countryCode: $cCode}}) {nodes {idnamecountryCode}}},{"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: $perPagefilter: {addrState: $state}}) {nodes {idnameaddrState}}},{"perPage": 4,"state": "CT"}
Example #3 (by coordinates + radius distance)
- Request
- Response
query SocalTournaments($perPage: Int, $coordinates: String!, $radius: String!) {tournaments(query: {perPage: $perPagefilter: {location: {distanceFrom: $coordinates,distance: $radius}}}) {nodes {idnamecity}}},{"perPage": 4,"coordinates": "33.7454725,-117.86765300000002","radius": "50mi"}