Override type of column #8620
-
Is there any way to override the type of a column at the Hasura level without altering the underlying DB? My use case: I have a bigint column in Postgres that I would like to be treated as Is there any way to tell Hasura "serialize this specific column as a string"? Other things I've tried:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It seems you are asking for two things: Ability to arbitrarily map column to custom scalar typeThis is not currently possible. If this feature is important to you, you may open a feature request. Ability to arbitrarily cast a column to another typeThere is no dedicated setting for this, however it can be achieved with the following workaround:
I'm of course assuming your column to be mapped is named |
Beta Was this translation helpful? Give feedback.
It seems you are asking for two things:
Ability to arbitrarily map column to custom scalar type
This is not currently possible. If this feature is important to you, you may open a feature request.
Ability to arbitrarily cast a column to another type
There is no dedicated setting for this, however it can be achieved with the following workaround:
id
column to something like_id
id
I'm of course assuming your column to be mapped is named
id
, change this as required.