Fix supabase-js .contains() JSONB serialization for projects.shared_with

↗ view on GitHub · promptly3518 · 2026-05-03 · f5ba5e8b

supabase-js's .contains(column, value) generates PostgreSQL array
literal syntax ({val1,val2}) when given a JS array. PostgREST then
tries to parse this as JSON for a JSONB column and fails with
'invalid input syntax for type json'. Passing JSON.stringify([...])
forces it through the string-passthrough branch, producing valid JSON
array syntax (["val1","val2"]) that PostgREST parses correctly.

routes/tabular.ts already had the JSON.stringify form. Propagating
the same pattern to the two remaining call sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Repository promptly3518/mike
Author promptly3518 <218282670+promptly3518@users.noreply.github.com>
Authored
Parents 0e38936a
Stats 2 files changed , +2 , -2
Part of Supabase JSONB shared_with serialization fix (and diagnostic logging)

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-f5ba5e8b.md from inside the repo you want the change in.

⬇ Download capture-commit-f5ba5e8b.md