Location
Information about the user location.
Type Definition
type Location {
zipcode: String
city: String
subdivisions: [String]
country: String
continent: String
accuracyRadius: Int
latitude: Float
longitude: Float
timeZone: String
}Fields
| Field | Type | Nullable | Description | Related Types |
|---|---|---|---|---|
zipcode | String | Yes | Returns the zipcode for this location. | None |
city | String | Yes | Returns the city for this location. | None |
subdivisions | [String] | Yes | Returns the subdivisions for this location. | String |
country | String | Yes | Returns the country for this location. | None |
continent | String | Yes | Returns the continent for this location. | None |
accuracyRadius | Int | Yes | Returns the accuracy radius in meters for this location. | None |
latitude | Float | Yes | Returns the latitude for this location. | None |
longitude | Float | Yes | Returns the longitude for this location. | None |
timeZone | String | Yes | Returns the time zone for this location. | None |
Relationships
- The
subdivisionsfield is a list of strings representing administrative subdivisions (e.g., states, provinces) related to the location. - All other fields are scalar values directly describing geographical or temporal attributes of the location.
- There are no direct relationships to other custom object types.
Usage Examples
Basic Query
{
location {
zipcode
city
country
continent
}
}Field Selection
{
location {
city
subdivisions
latitude
longitude
timeZone
}
}Nested Queries
Since Location does not contain nested object types, nested queries are limited to accessing the list field subdivisions:
{
location {
city
subdivisions
}
}Filtering and Sorting
The Location type itself does not provide filtering, sorting, or pagination fields. These operations should be applied at the query or parent object level that returns Location.
Implements
This type does not implement any interfaces.
Connections
No connection fields are defined on the Location type.
Related Types
String— used for scalar fields and the list of subdivisions.
Best Practices
- Use the
accuracyRadiusfield to understand the precision of the location data, especially when performing geospatial calculations or displaying maps. - When querying for location data, select only the fields you need to optimize response size and performance.
- Use
latitudeandlongitudetogether for mapping or distance calculations. - Handle optional fields gracefully, as any field may return
nullif the data is unavailable. - The
timeZonefield can be useful for localizing timestamps or scheduling events based on user location.
Notes
- All fields in the
Locationtype are optional and may returnnull. - The API currently requires no authentication; however, this may change in future versions.
- Location data accuracy depends on the source and may vary; always check
accuracyRadiusbefore relying on precise coordinates. - Since
Locationcontains only scalar and list of scalar fields, it is lightweight and performant to query. - There are no computed or derived fields in this type.
- No field arguments are defined for any
Locationfields.
For any questions or issues, please refer to the API changelog or contact support.
Last updated on