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
Now I want the user to be able to update their first name and last name, but not anything else without first providing the password. I still want to keep with the naming convention of t.crud so I have
But while running nexus dev I get an error on where inside of await db.user.update(...) saying that the where argument's properties expect either their defined values or undefined, but could potentially receive value | undefined | null.
Is there a way for me to prevent this null from potentially happening while using the t.crud feature? Currently my only way around this is to do stuff like
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all. Let's assume I have a User model:
Now I want the user to be able to update their first name and last name, but not anything else without first providing the password. I still want to keep with the naming convention of
t.crud
so I haveBut while running
nexus dev
I get an error onwhere
inside ofawait db.user.update(...)
saying that thewhere
argument's properties expect either their defined values orundefined
, but could potentially receivevalue | undefined | null
.Is there a way for me to prevent this
null
from potentially happening while using thet.crud
feature? Currently my only way around this is to do stuff likeBut that seems to defeat the purpose of using
t.crud
with how verbose that can become.The following versions of nexus and plugins are listed here:
Beta Was this translation helpful? Give feedback.
All reactions