PrismaP
Prisma13mo ago
6 replies
sitaram

TypeScript issue with JSON[] field filter using path

I have the following model and am using a PostgreSQL database:

model Message {
mentions Json[]
}

I am using prisma-json-types-generator to generate the types. For the mentions field, the generator produced a type NullableListFilter that does not have the path method.

When trying to filter on message with a path using prisma.message.findMany, I am getting the TypeScript error: Object literal may only specify known properties, and 'path' does not exist in type 'NullableListFilter<PrismaJson.Message>'.

Any thoughts on this issue are appreciated.
Was this page helpful?