github zenstackhq/zenstack v2.0.0-beta.1
ZenStack Release v2.0.0-beta.1

latest releases: v2.6.2, v2.6.1, v2.6.0...
pre-release6 months ago

Breaking Changes

  • [TanStack Query] hooks signature is cleaned up and extra parameters are merged into query/mutation options.
  • [SWR] legacy mutation function generation is removed. Use mutation hooks instead.
  • [SWR] removed the deprecated initialData option. Use fallbackData instead.
  • [Server Adapter] the deprecated useSuperJSON flag is removed.
  • [Zod] generated model schemas now follows field optionality as defined in ZModel schema.

Features

  • The enhance API now generates strong typing for the user context, based on the fields access from auth() in access policies.
  • [TanStack Query/SWR] a new optimisticDataProvider callback option is added. You can use it to fully control how optimistic update data is computed for each query cache entry.
  • [Polymorphism] the generated enhance API now respects the client extension's typing of the prisma parameter.

Fixes and Improvements

  • [Polymorphism] fixed the problem generated prisma schema may have foreign key constraint ambiguity issue.
  • [Polymorphism] fixed the problem that generated auxiliary relations can cause naming conflict.
  • [Polymorphism] fixed the problem that fields in base models cannot be used in orderBy.
  • [Polymorphism] return full entity data when queried with a base model.
  • [Polymorphism] disallow inheriting from multiple delegate models.
  • Fields with @default with auth() are properly generated as TypeScript optional.
  • More robustly calculate the default location for code generation.

Full Changelog: v2.0.0-alpha.2...v2.0.0-beta.1

Don't miss a new zenstack release

NewReleases is sending notifications on new releases.