FormingSkillclaude-codepublished fresh until

Drizzle 1.0.0-rc.5: why do filters and JSON change?

Summary When using Drizzle 1.0.0-rc.5 (checked 2026-10-28), import EmptyFilter for intentional omitted filters, reject missing required identity inputs, and review relation-presence and postgres-js serialization behavior.

Not for broad ORM upgrade readiness, see postgresql-19-prisma-8-drizzle-neon-supabase-upgrade-risks

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v1.0.0Scan a TS project for Drizzle 1.0 RC changes
How you use itYou ask for it
What it can doinstalls software · writes files · network · runs shell
What's inside
ASkill · v1.0.0Scan a TS project for Drizzle 1.0 RC changes
How you use it
You ask for it
What it can do
installs software · writes files · network · runs shell
What's inside

What this thread does

First import the optional-filter sentinel: import { EmptyFilter } from 'drizzle-orm/relations';. For an intentionally optional boolean, use isActive: params.isActive ?? EmptyFilter. Reject missing required identity inputs instead; then review relation-presence filters and postgres-js serialization workarounds before rollout.

What changed

How to migrate

1. Pin the intended drizzle-orm RC (version above, checked 2026-10-28). Inventory relational builders and raw postgres-js calls; read the full release before choosing the rest of your upgrade scope. 2. Reject missing identity inputs before querying. For intentionally optional inputs, import EmptyFilter from drizzle-orm/relations; the release example is db.query.users.findMany({ where: { isActive: params.isActive ?? EmptyFilter } }). Avoid this fallback for authorization predicates. 3. Change where: { posts: {} } to where: { posts: true } for presence or where: { posts: false } for absence. Review builders that assemble empty nested conditions. 4. Remove workaround-only JSON.stringify(jsonValue) from raw SQL/driver calls. Bind JSON arrays with sql.param(jsonArrayValue). Retain intentional serialization for HTTP, files and text columns. 5. Compare raw-driver and ORM fixtures before deploying. For nested relational callbacks, follow Drizzle Queries: use the callback's aliased table rather than an imported table reference.

What breaks

Diagnostic: undefined in relational where filters

The release specifies that this throws, but does not publish a canonical exception message; match the input and call site instead of a guessed error string.

Expect rejected optional-filter builders, broader results from empty relation conditions, or double-encoded JSON if the old workaround remains. Review query and serialization behavior before changing migration history.

What to test

FixtureAssertion to add
Required token or tenant ID is absentRequest is rejected before a database query; no fallback session or tenant is selected
Optional boolean is false, true or absentBoth booleans remain filters; only intentional absence removes the condition
Parent has no children, one child or severalPresence and absence conditions return the intended parent IDs
Raw JSON object and JSON arrayRound trip preserves object/array shape and values rather than returning a serialized string
Same driver shared with raw callsCompare direct-driver and ORM paths for JSON and temporal fields

These are proposed regression checks; no fixture was run here. Include malformed inputs in tests instead of relying solely on TypeScript types.

Pitfalls

Do not use EmptyFilter to hide a missing authorization value. Do not replace a boolean fallback with truthiness: false is a valid filter value. Do not globally delete JSON.stringify. Check that an empty nested object was truly intended to mean no restriction. If a relation's SQL alias becomes unreachable after this upgrade, inspect the additional query-strategy breaking changes in the release notes.

Community evidence

  • In issue #5636, irisarco reports that an absent token caused a session lookup to select an arbitrary row; a commenter confirms reliance on optional filtering. The author's phrase, “return a random session,” describes the historical risk, not a result I reproduced.
  • In issue #3171, camc314 supplies a raw SQL JSON-object reproduction; the reported error ends “Received an instance of Object” The release explicitly links this issue to the driver repair. The report predates this RC and does not prove every workaround can safely be deleted.

A prompt to give your agent

Your training data predates this release. Read the linked official Drizzle release notes and query documentation; do not guess an error message or migration command. Inspect relational where builders and raw postgres-js JSON calls. Classify each missing input as required identity or intentionally optional. Propose a small diff for explicit omission, relation presence/absence and workaround removal. Add fixture assertions for tenant isolation, false booleans, empty relations, JSON arrays and temporal values. Do not connect to a database or change migration history.

Limits

Checked 2026-10-28. No package installation, query execution, migration or driver round trip was performed. Two real user issues explain the failure modes; independent reports confirming this RC's fixes remain thin. This is a focused subset of a larger breaking release. Prices and licences were not compared.

Started from a post by @AlexBlokh, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Drizzle 1.0.0-rc.5: why do filters and JSON change?
Summary: When using Drizzle 1.0.0-rc.5 (checked 2026-10-28), import `EmptyFilter` for intentional omitted filters, reject missing required identity inputs, and review relation-presence and postgres-js serialization behavior.

## Options
- A · Scan a TS project for Drizzle 1.0 RC changes · early, no verdict yet · installs software · writes files · network · runs shell
Copy for agent
get the whatworks thread drizzle-rc5-undefined-empty-filters-postgres-js-json and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread drizzle-rc5-undefined-empty-filters-postgres-js-json

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Scan a TS project for Drizzle 1.0 RC changes

Read-only scan of TypeScript files for relational where filters, postgres-js JSON workarounds and drizzle-kit drop affected by the 1.0 RC.

Format
Skill
Source
—
Pinned
v1.0.0 · sha256:4a0bc
Content hash
4a0bc542d0906b8c
Audit
scan passed
Can do
installs software · writes files · network · runs shell
Works with
claude-code
Check
Runs bundled positive and negative fixtures from memory; reads and writes no project files.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-drizzle-rc-scan before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp