Prisma · sdk · fg-0294

Prisma rejects null for a Json field: Type 'null' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue'

Type 'null' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue | undefined'.

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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 } } })

Affects: Prisma ORM 6 and 7, reproduced on 7.10.0

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp