bitsofinfo
09/09/2022, 4:59 PMasync update(updatedBy:Principal, data: Prisma.BlogUpdateInput): Promise<BlogEntry> {
data.updatedBy = updateBy.principalId;
return await this.prisma.blogEntry.update({
where: {
id: data.id
},
data: data
});
}
but this yields me an syntax error stating:
Type 'string | StringFieldUpdateOperationsInput' is not assignable to type 'string'.
Type 'StringFieldUpdateOperationsInput' is not assignable to type 'string'.ts(2322)
index.d.ts(4311, 5): The expected type comes from property 'id' which is declared here on type 'BlogEntryWhereUniqueInput'
BlogUpdateInput.id is just a string... what "generated" type should I be using to on my update() method that wraps the call to prisma? This is a bit confusingHarshit
09/12/2022, 10:11 AMVladi Stevanovic