Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state.
Arguments
locality
LocalityType!Required
Name of the locality.
city
StringName of the city.
country
StringName of the country.
pageNo
IntThe page number to navigate through the given set of results. Default value is 1.
pageSize
IntThe number of items to retrieve in each page. Default value is 12.
search
StringThis parameter is used to filter or search the records.
state
StringState or the province.
Response
items
[Locality]List of localities, each containing detailed information about individual locality.
page
PageInfoPagination details for the list of locations, including current page, page size, and total items.
Query
1query localities(2 $locality: LocalityType!3 $city: String4 $country: String5 $pageNo: Int6 $pageSize: Int7 $search: String8 $state: String9) {10 localities(11 locality: $locality12 city: $city13 country: $country14 pageNo: $pageNo15 pageSize: $pageSize16 search: $search17 state: $state18 ) {19 items {20 display_name21 id22 name23 parent_ids24 type25 custom_meta26 parent_uid27 meta28 code29 }30 page {31 current32 next_id33 has_previous34 has_next35 item_total36 type37 size38 }39 }40}
Try it
Input Variables
1{2 "locality": "state",3 "city": "Montreal",4 "country": "Canada",5 "pageNo": 42,6 "pageSize": 42,7 "search": "search",8 "state": "Quebec"9}
Response
1{2 "localities": {3 "items": [4 {5 "display_name": "display_name",6 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",7 "name": "A name",8 "parent_ids": [9 "parent_ids"10 ],11 "type": "type",12 "custom_meta": {},13 "parent_uid": "parent_uid",14 "meta": {},15 "code": "code"16 }17 ],18 "page": {19 "current": 42,20 "next_id": "next_id",21 "has_previous": true,22 "has_next": true,23 "item_total": 42,24 "type": "type",25 "size": 4226 }27 }28}
Was this section helpful?