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 restarts zero-cache on changes to schema.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 with sslmode=disable. (docs)
  • Permission Helpers. ANYONE_CAN and NOBODY_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] where result is an object with a type field.
  • postProposedMutation in write permissions for update renamed to postMutation for consistency.
  • TableScheamToRow renamed to Row to not be so silly long.