- Symptom
- Type 'null' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue | undefined'.where: { meta: null } fails type checking with Type 'null' is not assignable to type 'JsonNullableFilter'
- Cause
- A nullable Json column can hold two different nulls, SQL NULL and the JSON value null, so Prisma refuses a bare null and makes you choose. Filters on them also need the explicit equals form.
- Fix
- Write Prisma.DbNull or Prisma.JsonNull, and filter with equals and Prisma.AnyNull. In Prisma 7 import Prisma from the generated client.
- Apply
import { Prisma } from './generated/prisma/client' await prisma.item.create({ data: { meta: Prisma.DbNull } }) await prisma.item.findMany({ where: { meta: { equals: Prisma.AnyNull } } })- Affected
- Prisma ORM 6 and 7, reproduced on 7.10.0
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders