ElasticGraph Query API: Geographic Filtering
The GeoLocation
type supports a special predicate:
near
- Matches records where the field’s geographic location is within a specified distance
from the location identified by
latitude
andlongitude
.When
null
or an empty object is passed, matches all documents.
query FindSeattleVenues {
venues(filter: {
location: {near: {
latitude: 47.621
longitude: -122.349
maxDistance: 10
unit: MILE
}}
}) {
nodes {
name
capacity
}
}
}