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-dev
script that automatically rebuilds the schema and restartszero-cache
on 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
timestampz
Postgres column type. (docs) - SSLMode. You can disable TLS when
zero-cache
connects to DB withsslmode=disable
. (docs) - Permission Helpers.
ANYONE_CAN
andNOBODY_CAN
helpers were added to make these cases more readable. (docs) - Multitenant Support. A single
zero-cache
can 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-cache
to exit silently. Now they are returned to client and logged.
Breaking Changes
useQuery
in React now returns a 2-tuple of[rows, result]
whereresult
is an object with atype
field.postProposedMutation
in write permissions forupdate
renamed topostMutation
for consistency.TableScheamToRow
renamed toRow
to not be so silly long.