SupabaseS
Supabase3mo ago
るち

Generated types have unstable field order

It looks like supabase gen types typescript does not produce deterministic output.
The order of object properties in Args and Returns is not stable between local and CI runs, even when the schema is the same.

As a result, diffs are detected in CI and the job fails.
I followed this guide for generating types in CI:
https://supabase.com/docs/guides/deployment/ci/generating-types

Example:
  • Args: { first_name; last_name; email }
  • Args: { first_name; email; last_name }
Expected: the generated types should always have the same order for a given schema, regardless of environment.

Is there a recommended solution or workaround for this?
End-to-end type safety across client, server, and database.
Was this page helpful?