query

localities

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
Required
Name of the locality.
city
String
Name of the city.
country
String
Name of the country.
pageNo
Int
The page number to navigate through the given set of results. Default value is 1.
pageSize
Int
The number of items to retrieve in each page. Default value is 12.
search
String
This parameter is used to filter or search the records.
state
String
State or the province.
Response
List of localities, each containing detailed information about individual locality.
Pagination details for the list of locations, including current page, page size, and total items.
Query
1query localities(
2 $locality: LocalityType!
3 $city: String
4 $country: String
5 $pageNo: Int
6 $pageSize: Int
7 $search: String
8 $state: String
9) {
10 localities(
11 locality: $locality
12 city: $city
13 country: $country
14 pageNo: $pageNo
15 pageSize: $pageSize
16 search: $search
17 state: $state
18 ) {
19 items {
20 display_name
21 id
22 name
23 parent_ids
24 type
25 custom_meta
26 parent_uid
27 meta
28 code
29 }
30 page {
31 current
32 next_id
33 has_previous
34 has_next
35 item_total
36 type
37 size
38 }
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": 42
26 }
27 }
28}