Closed simonw closed 3 years ago
Syntax something like:
plugins:
datasette-graph-ql:
databases:
sf-trees:
tables:
arguments:
radius:
inputs:
lat: float
lng: float
km: float
where_sql: |-
PtDistWithin(geometry, MakePoint(:lat ,:lng, 4326), :km * 1000)=TRUE
I think this is too similar to #16 - I'm going to solve this with custom queries instead, by making it so custom queries can state "I return the equivalent of an Entry" so nested GraphQL for foreign keys can work correctly.
Relates to #16. How about if you could define custom arguments on tables which worked something like this:
The
radius
here would be a custom argument defined in the plugin configuration.Maybe it can be defined in terms of the
where
SQL clauses it adds?