New Features
- Client-side computed fields extension by @genu doc
- OpenAPI specification generator (for RESTful style API only) doc
- RESTful-style API now supports additional endpoints for nested read and write for related resources by @lsmith77 doc
- Zod schema generation now supports selecting fields and relations by @marcsigmund doc
- VSCode extension (v3) now supports generating human-readable documentation for ZModels
Performance
ZenStackClientnow provides a$diagnosticsproperty containing performance-related metrics doc.- Optimized the generated TypeScript schema's typing to improve tsc performance.
- Eliminated several unnecessary pre-mutation reads to improve mutation performance.
- Reduced the overhead of post-query data rows processing.
- Improved many-to-many relation manipulation by batching foreign key updates.
Breaking Changes
-
We've unified field names' casing in ZenStackClient options to "lower-case-first".
// old const db = new ZenStackClient(schema, { omit: { User: { ... } }, computed: { User: { ... } } }); // new const db = new ZenStackClient(schema, { omit: { user: { ... } }, computed: { user: { ... } } });
Fixes and Improvements
Unsupportedtyped fields are now excluded from ORM client since they cannot be represented on the ORM side.- Access policy plugin now has an option to allow executing raw SQL (without policy enforcement) by @pkudinov doc
- Fixed incorrect zod typing for scalar list fields by @haltcase #2499
- Preserve transaction state when calling
$use,$unuse, and$unuseAllby @pkudinov #2494 - Disallow
includeon models without relation fields #2488
New Contributors
Welcome @haltcase @elliots @marcsigmund as our new contributors ❤️ !
Full Changelog: v3.4.6...v3.5.0