---
url: "https://www.skedulo.com/release-notes/distance-filtering-and-ordering-for-standard-fields-in-graphql"
type: "releaseNote"
title: "Distance filtering and ordering for standard fields in GraphQL"
date: "2025-10-17"
---

# Distance filtering and ordering for standard fields in GraphQL

You can now filter and order results from a GraphQL query using the new Distance operator on standard fields. For example, a developer could now query a location that is less than 10KM from a given point, and order the results so that the closest location is first in the results.

Skedulo has always offered a basic level of support for geospatial data, primarily through our Geolocation field type. However, prior to this release, we had not given developers using our GraphQL API any mechanisms to use the geolocation data to influence results.

With this release we are introducing a new EQL operator called DISTANCE, that can be used to filter or sort results.

The DISTANCE operator accepts a standard field, and a geolocation literal as arguments, and can be used in EQL Filters or orderBy statements.

**orderBy example**

query {   regions(orderBy: “DISTANCE(GeoLocation, GEOLOCATION(37.77, -122.42)) DESC”){     edges {       node {         UID         Name       }     }   } }

**filter example**

query {   regions(filter: “DISTANCE(GeoLocation, GEOLOCATION(37.77, -122.42)) < 50000”){     edges {       node {         UID         Name       }     }   } }

**Compatibility**

- Currently the distance operator is only supported on standard fields, custom fields are not supported.
- This feature is supported for both Pulse and Salesforce customers.

**Documentation**

For more details and examples, please refer to the [documentation](https://docs.skedulo.com/developer-guides/use-and-manage-location-information/geolocation-field-type-and-distance-comparison/).
