hasura / hasura/graphql-engine

Introduce Postgis TopoJson support for Geography?

Open
#6,563 0 comments 0 reactions 1 assignee Claimed by @0x777 View on GitHub
a/data/postgres c/server k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

The support for Geography types (via Postgis) seems to default to a `ST_AsGeoJSON` conversion. PostGis 2.1+ also supports `AsTopoJSON` (https://postgis.net/docs/manual-dev/AsTopoJSON.html). Would it be possible to introduce some sort of parameter to request this conversion?

Pseudo:
```
table {
some_polygon_column : some_polygon_column.AsTopoJSON()
}
```

Code mentions of ST_AsGeoJSON:

https://github.com/hasura/graphql-engine/blob/9ef603360cfe47d28c8edfcd1802901412d3d534/server/src-lib/Hasura/Backends/Postgres/DDL/Table.hs#L102

https://github.com/hasura/graphql-engine/blob/9ef603360cfe47d28c8edfcd1802901412d3d534/server/src-lib/Hasura/RQL/DML/Internal.hs#L291

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.