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
Originally posted by GuiSim October 26, 2021
Hello!
I'm new to Prisma and testing it out. I encountered an issue today where an update statement would not raise any type issue on an invalid data object.
prisma.mything.update({
where: { id: '1' },
data: { invalidField: 42 }, // Does not compile as `invalidField` is not a valid field on `mything`
});
const data = { invalidField: 42 };
prisma.mything.update({
where: { id: '1' },
data: data, // Compiles without issues. Why?
});
Activity
Jolg42 commentedon Feb 16, 2024
Closing as duplicate, see #22445 which was reproduced
fix(client): reject non-object values in XOR type helper (#29735)
fix(client): reject non-object values in XOR type helper (prisma#29735)