Skip to content

Support bounding box filter on spatial fields #6604

@saltty9188

Description

@saltty9188

Currently when filtering on spatial fields, the only options available are for checking the distance between the field point and some other point or exact point matches. It would be nice if we could check if the field point is within a defined bounding box, or at least be able to use numerical filters against the coordinate components directly to simulate the same effect.

For example:

type Location @node {
    coordinates: Point!
}

Could be filtered like so:

location(where: {
    coordinates: {
        withinBB: {
            lowerLeft: { latitude: 10, longitude: 10 }
            upperRight: { latitude: 20, longitude: 20 }
        }
    }
}) {
    coordinates { latitude longitude }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions