Geebrox
05/28/2022, 10:13 AMdelete method.
await this.prismaService.task.delete({ where: { name } });
name field is uniqueOmar
05/28/2022, 2:28 PM/**
* Configure findUnique/findFirst to throw an error if the query returns null.
* * @example
*
* // Reject on both findUnique/findFirst
* rejectOnNotFound: true
* // Reject only on findFirst with a custom error
* rejectOnNotFound: { findFirst: (err) => new Error("Custom Error")}
* // Reject on user.findUnique with a custom error
* rejectOnNotFound: { findUnique: {User: (err) => new Error("User not found")}}
* */
rejectOnNotFound?: RejectOnNotFound | RejectPerOperation
I thought it could work for your case, but the code doesn't show that. So maybe you have to create a feature request on Github.Nurul
05/30/2022, 1:41 PM