Contact GraphQL
Nested getContactAddresses Resolver
Contact now exposes getContactAddresses(filter, orderBy) for loading a contact's addresses with server-side filtering and sorting. Use it when a contact query only needs a subset of addresses or a deterministic address order.
query ContactAddresses($organizationId: Int!) {
getContacts(organizationId: $organizationId, filter: "contactId:123") {
items {
contactId
name
getContactAddresses(filter: "addressType:Shipping", orderBy: "cityName") {
contactAddressId
addressType
addressLine
cityName
stateCode
countryCode
}
}
}
}
Arguments:
| Argument | Type | Description |
|---|---|---|
filter | String | Lucene filter applied to the contact address rows for the parent contact. |
orderBy | String | Sort expression applied to the returned addresses. |
The resolver is projected, so select only the address fields required by the UI or workflow.