You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When drizzle $inferSelects on a table, it expects date fields to be of type Date, however, when they are fetched from database, they are casted as strings, causing difference in types runtime vs type inference, leading to runtime type errors, which are approved by typescript.
@amandesai01 then it would also same for createdAt and updatedAt?
Solution? Always use types be inferring from Zod, export from shared/schemas.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
@amandesai01 then it would also same for createdAt and updatedAt?
You mean we have to do it for all tables:
example
to
Beta Was this translation helpful? Give feedback.
All reactions