Zero 0.8
Schema Autobuild, Result Types, and Enums
Install
npm install @rocicorp/zero@0.8
See the changes to hello-zero or hello-zero-solid for example updates.
Features
- Schema Autobuild. There's now a
zero-cache-devscript that automatically rebuilds the schema and restartszero-cacheon changes toschema.ts. (docs) - Result Type. You can now tell whether a query is complete or partial. (docs)
- Enums. Enums are now supported in Postgres schemas and on client. (docs)
- Custom Types. You can define custom JSON types in your schema. (docs)
- OTEL Tracing. Initial tracing support. (docs)
- timestampz. Add support for
timestampzPostgres column type. (docs) - SSLMode. You can disable TLS when
zero-cacheconnects to DB withsslmode=disable. (docs) - Permission Helpers.
ANYONE_CANandNOBODY_CANhelpers were added to make these cases more readable. (docs) - Multitenant Support. A single
zero-cachecan now front separate Postgres databases. This is useful for customers that have one "dev" database in production per-developer. (docs)
Fixes
- Crash with JSON Columns. Fixed a crash when a JSON column was used in a Zero app with write permissions (bug)
- Better Connection Error Reporting. Some connection errors would cause
zero-cacheto exit silently. Now they are returned to client and logged.
Breaking Changes
useQueryin React now returns a 2-tuple of[rows, result]whereresultis an object with atypefield.postProposedMutationin write permissions forupdaterenamed topostMutationfor consistency.TableScheamToRowrenamed toRowto not be so silly long.