autocompleteAddressFieldOptions
Autocomplete the SELECT options of a single field in an address field descriptor. Resolves the descriptor identified by addressFieldDescriptorId, locates the field named fieldName, and returns its options filtered by query (a case-insensitive substring match against each option's label, capped at a fixed result limit). An empty or omitted query returns the first options unfiltered, still subject to the cap, which is handy for previewing the available options before the user has typed anything.
Arguments
Address field descriptor identifier. Typically an ISO 3166-1 alpha-2 country code, but may also be a custom descriptor key.
Machine identifier of the field to autocomplete, e.g. 'administrative_area'.
The user-supplied type-ahead query. An empty string matches every option, subject to the cap.
Possible Errors
Allowed Viewers
Rate Limits
| Key | Steps |
|---|---|
ip |
['10/s'] |
Query Complexity
1Examples
query AutocompleteAddressFieldOptions(
$addressFieldDescriptorId: String!,
$fieldName: String!,
$query: String
) {
autocompleteAddressFieldOptions(
addressFieldDescriptorId: $addressFieldDescriptorId,
fieldName: $fieldName,
query: $query
) {
label
value
}
}
Variables
{
"addressFieldDescriptorId": "46360026",
"fieldName": "situation-nothing-why-ground-listen",
"query": "recently-until-perform-black-weight"
}
Response
{
"data": {
"autocompleteAddressFieldOptions": [
{
"label": "the-bring-American-region-institution",
"value": "road-effect-personal-together-trouble"
}
]
}
}