hasura / hasura/graphql-engine
Generated column is typed as `float8` instead of `Float`
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
I have a complex query where I need to use 1 variable on 2 fields; using `_st_d_within` on first field and `_gte` on second field. However the second field is a computed column of type `double precision` that got exposed as `float8` by Hasura which is incompatible with the `Float` type of Postgis `ST_DWithin`.
Is there a way to cast these type somehow? We shouldn't need to create a custom SQL function to bypass the type issue.
Contributor guide
Research direction
The report concerns Hasura's GraphQL exposure of a PostgreSQL computed column and its PostGIS type compatibility, but names no source file, test, or reproduction schema. Start by locating the code and tests that map PostgreSQL computed-column types to GraphQL types; done means the reported `float8` versus `Float` incompatibility is reproduced and resolved without requiring a custom SQL function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgres
- Domain
- api, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100