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.