hasura / hasura/graphql-engine

Bring back st_d_within for geographic lookups

Open
#10,672 1 comment 0 reactions 0 assignees View on GitHub
c/v3-ndc-postgres k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Component
c/v3-engine
c/v3-ndc-postgres

### Is your proposal related to a problem?
In Hasura v2, geographic lookups were easily performed using st_d_within, allowing users to find relevant objects around a given location by providing a point and search radius.

In Hasura v3, only st_within is supported. As a result, performing similar lookups now requires generating the lookup geometry on the client side beforehand.

### Describe the solution you'd like
Reimplement st_d_within.

### Describe alternatives you've considered
Generating lookup geometries on the client side.

Contributor guide

Open the contributing guide

Research direction

Start in c/v3-engine and c/v3-ndc-postgres by tracing the existing st_within support. Compare the described Hasura v2 st_d_within behavior with the v3 geographic lookup path and determine the required interface and validation. Done means users can perform distance-based geographic lookups with st_d_within without generating lookup geometries client-side.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.