How do I coerce types in my schema? #9690
-
I appologize for the noob question, I have poked around the docs and googled a bit, but am not really sure where II should be looking. I have a postgresql database, and unfortunately the fields that are timestamps are actually stored as ints (unix time stamps). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can probably solve this when reading the data by creating a function to do the conversion, and then using a computed field. Alternatively, you can write a native query to convert the data any way you like. A future release of Hasura will also support mutations using native queries. Does that help? |
Beta Was this translation helpful? Give feedback.
You can probably solve this when reading the data by creating a function to do the conversion, and then using a computed field.
Alternatively, you can write a native query to convert the data any way you like. A future release of Hasura will also support mutations using native queries.
Does that help?