zth/rescript-relay

Timestamp type generation support

DenhamPreen opened this issue · 5 comments

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

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

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

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

Ya sure :)

I'll open a new issue and assign myself