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
First thing I came up with, is by calling computedInputs in the nexusPrisma option. But it won't work since they need to be handled differently depending on the situation, but globally:
1. create -> createdAt = now, updatedAt = null
2. update -> createdAt = keep as it is, updatedAt = now
In order to make it work, I need to set computedInputs individually like so:
While this might work, I'm unable to "compute" these inputs on the nested models. In order to prevent passing createdAt/updatedAt, I have to create another t.crud on that resource as well, without these timestamps.
The last workaround for this that might work, is to not use t.crud at all, which is a bummer.
The text was updated successfully, but these errors were encountered:
First thing I came up with, is by calling
computedInputs
in thenexusPrisma
option. But it won't work since they need to be handled differently depending on the situation, but globally:In order to make it work, I need to set computedInputs individually like so:
While this might work, I'm unable to "compute" these inputs on the nested models. In order to prevent passing createdAt/updatedAt, I have to create another
t.crud
on that resource as well, without these timestamps.The last workaround for this that might work, is to not use
t.crud
at all, which is a bummer.The text was updated successfully, but these errors were encountered: