What you wanted to do
query($north: Float!, $south: Float!, $east: Float!, $west: Float!) {
queryLocation(filter: {
coordinates: {
within: {
north: $north,
south: $south,
east: $east,
west: $west
}
}
}) {
id
coordinates {
latitude
longitude
}
}
}
What you actually did
query($north: Float!, $south: Float!, $east: Float!, $west: Float!) {
queryLocation(filter: {
coordinates: {
within: {
polygon: {
coordinates: [
{
points: [
{
longitude: $east,
latitude: $north,
},
{
longitude: $east,
latitude: $south,
},
{
longitude: $west,
latitude: $south,
},
{
longitude: $west,
latitude: $north,
},
{
longitude: $east,
latitude: $north,
}
]
}
]
}
}
}
}) {
id
coordinates {
latitude
longitude
}
}
}
Why that wasn’t great, with examples
It is a little harder on the application to build out this complex input when I have the NE and SE corners of a bounding box like is used with leaflet maps.
Any external references to support your case
Maybe this is standard geospatial input, but it just seems very verbose when trying to build smart applications.