zth / rescript-relay

Use Relay with ReScript.
https://rescript-relay-documentation.vercel.app/docs/getting-started
333 stars 49 forks source link

Timestamp type generation support #471

Closed DenhamPreen closed 9 months ago

DenhamPreen commented 9 months ago

Current behaviour: Postgres timestamp type is being typed as RescriptRelay.any

Desired behaviour: The typed mapped into some sort of date, possibly a Js.Date.t

Screenshot of hasura dashboard of postgres table columns showing the column created_time type image

Screenshot of the generated type image

cc: @mjyoung114 @jasoons

zth commented 9 months ago

If it's a custom scalar in the Hasura schema you can do that already easily: https://rescript-relay-documentation.vercel.app/docs/custom-scalars

DenhamPreen commented 9 months ago

Thanks 🙏 this is exactly what I was looking for.

Checkout algolia search for docusaurus might make it easier for others. https://docusaurus.io/docs/search

zth commented 9 months ago

Would you be up for PRing that functionality to the docs? I can do the actual application to Algolia.

DenhamPreen commented 9 months ago

Ya sure :)

DenhamPreen commented 9 months ago

I'll open a new issue and assign myself