Open StringKe opened 1 month ago
The types of SomeUpdateArgsSchema do not use the where condition of methods such as find.
SomeUpdateArgsSchema
update: adminProcedure.input(ProductAttributeUpdateArgsSchema).mutation(async ({ input }) => { const database = getDatabase(); if (!input.where.id) { throw BusinessError.fromCode('ID_NOT_FOUND'); } const data = await database.productAttribute.findUnique({ where: { id: input.where.id, // SomeUpdateArgsSchema not worker this }, }); if (!data) { throw BusinessError.fromCode('ID_NOT_FOUND'); } return database.productAttribute.update({ where: { id: input.where.id, }, data: input.data, }); }),
The types of
SomeUpdateArgsSchema
do not use the where condition of methods such as find.