🚀 Announcement: We’ve just released supabase-js version 2.46.2-rc.3, which resolves several type errors in the PostgREST client.
Notable issues resolved:
- https://github.com/supabase/postgrest-js/issues/523
- https://github.com/supabase/supabase-js/issues/943
- https://github.com/supabase/postgrest-js/issues/450
- https://github.com/supabase/postgrest-js/issues/546
- https://github.com/supabase/supabase-js/issues/930
We’d love your feedback to ensure everything runs smoothly!
Important Notes:
This update might require regenerating your database types. You can do this via the Supabase CLI (≥v1.207.8) or the dashboard. For instructions, check out our guide here.
Potential Issues
This version introduces stricter alignment between runtime behavior and type inference. As a result, some types might appear "broken" but are actually being corrected.
The main changes to be aware of:
- The result of an embedding now correctly infers a single object or an array based on the relationship.
- The result of an object embedding now more accurately identifies whether the result can be
null.
Before reporting a bug, please double-check that the inferred types are truly incorrect based on your query and database schema.
Bug Reporting:
If your project is hosted on Supabase, please open a support ticket here and check "Allow Supabase Support to access your project temporarily." This will enable us to investigate your database types directly.
Alternatively, you can open an issue on GitHub. Please include:
- The generated
Databasetype used to instantiate the client (e.g.,createClient<Database>(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY)). If possible a minimalSQLdeclaration resulting in suchDatabasetype. - The query where type inference failed (e.g.,
.from('which-table').select('which-query')). - Your TypeScript version (
npx tsc -v).