Skip to content

Fix JSON type alias for datetime and UUID in TypedDicts#1514

Open
aydgnme wants to merge 1 commit into
supabase:mainfrom
aydgnme:fix/json-type-datetime-uuid
Open

Fix JSON type alias for datetime and UUID in TypedDicts#1514
aydgnme wants to merge 1 commit into
supabase:mainfrom
aydgnme:fix/json-type-datetime-uuid

Conversation

@aydgnme

@aydgnme aydgnme commented Jun 10, 2026

Copy link
Copy Markdown

Problem

The JSON type alias in postgrest/types.py did not include datetime,
date, time, or UUID. The Supabase CLI generates TypedDicts that
use these types, causing type errors when passing them to .insert(),
.upsert(), or .update().

Fix

Added datetime, date, time, and UUID to the JSON type alias.
These types are already serializable by httpx/pydantic — this was purely
a type annotation gap.

Testing

All 43 existing sync unit tests pass.

Fixes #1443

Supabase CLI generates TypedDicts that include datetime and UUID fields.
These are valid serializable types (httpx handles them), but the narrow
JSON type alias caused false type errors. Fixes supabase#1443.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

insert does not expect TypedDict provided by generated types

1 participant