TL;DR
Strapi v3.0.0-alpha.12.2 brings significant improvements to the framework's architecture, particularly in relation management, along with numerous bug fixes and enhancements. The major breaking change moves relation management logic into hooks for better organization. This release also introduces GraphQL Playground, enhances the admin UI with a redesigned locale selector, adds MongoDB authentication options, and fixes critical issues with permissions management and data storage. Developers will benefit from improved code quality through the addition of ESLint and Prettier configurations.
Highlight of the Release
- Breaking change: Relation management logic moved to hooks for better organization
- Added MongoDB authentication source and SSL options to the admin panel
- Switched from GraphiQL to GraphQL Playground for improved API exploration
- Fixed critical issues with permissions management during server restarts
- Improved data type handling for enumerations and float values in databases
- Enhanced admin UI with redesigned locale selector and CSS improvements
- Added ESLint and Prettier for better code quality and consistency
Migration Guide
Breaking Change: Relation Management in Hooks
The major breaking change in this release is moving the business logic for relation management into hooks. If you've built custom plugins or extensions that interact directly with relation management, you'll need to update your code.
How to Migrate:
-
Update to the latest version:
npm install [email protected]
-
If you've extended or customized relation management logic, review your code to adapt to the new hook-based approach.
-
After updating files, run npm install to ensure all dependencies are properly updated:
npm install
-
If you're using MongoDB with authentication, you can now configure the authentication source and SSL options directly through the admin panel instead of manual configuration.
-
Test your application thoroughly, especially any custom code that interacts with relations or permissions.
Upgrade Recommendations
This release contains a breaking change related to relation management, so testing is essential before upgrading production environments.
Priority: Medium
Who should upgrade immediately:
- Developers experiencing issues with relation management or permissions
- Teams using MongoDB who need the new authentication options
- Projects using GraphQL who would benefit from the new Playground interface
Who can wait:
- Production environments that are stable and not affected by the fixed bugs
- Projects with extensive customizations to relation management that would require significant testing
Upgrade Steps:
- Back up your database and project files
- Update your package.json to reference the new version
- Run
npm install to update dependencies
- Test thoroughly, especially relation management functionality
- If using custom code that interacts with relations, review and update as needed
Bug Fixes
Relation Management Fixes
- Fixed issues with losing morph relations when updating entries in Content Manager with Bookshelf
- Fixed one-to-one relation handling in both Mongoose and Bookshelf adapters
- Resolved problems with media relation updates
Permission Management Fixes
- Fixed permissions disappearing from the UI after server restart
- Prevented deletion of duplicate permissions per role, ensuring permission consistency
- Fixed login issues when registering the first admin user
Database Handling Improvements
- Updated Strapi-Bookshelf to properly store long float values using
double in MySQL and double precision in PostgreSQL
- Fixed enumeration column creation in Strapi-Bookshelf to use
varchar(255) consistently
- Fixed the
updatedAt/updated_at field bug when updating entries from the admin panel
Other Fixes
- Fixed
strapi.reload.isWatching === undefined error during development
- Properly disabled reserved attributes to prevent conflicts
- Fixed error when trying to access model references inside the GraphQL plugin
- Changed authentication response from 401 to 403 when a user is not allowed to perform an operation
- Fixed npm publishing issues for the email plugin
New Features
MongoDB Authentication Options
Added support for MongoDB authentication source (authSource) and SSL configuration directly in the admin panel, making it easier to connect to secured MongoDB instances without manual configuration.
GraphQL Playground Integration
Replaced GraphiQL with GraphQL Playground as the default GraphQL IDE, providing a more powerful interface for API exploration with better documentation features and a more intuitive user experience.
ESLint and Prettier Integration
Added comprehensive ESLint and Prettier configurations to the codebase, improving code quality and consistency across the project. This includes a pre-commit hook for Prettier to ensure code formatting standards are maintained.
Enhanced Locale Selector
Redesigned the language selector in the admin panel with a more intuitive and visually appealing interface, making it easier for users to switch between available languages.
Security Updates
No specific security fixes were mentioned in this release. The changes to authentication responses (returning 403 instead of 401 when a user lacks permissions) represent a standards compliance improvement rather than a security fix.
Performance Improvements
Mongoose Optimization
Disabled the minimize option by default on Mongoose, which prevents the removal of empty objects from the schema. This improves data consistency and prevents potential issues with empty objects being stripped from the database.
Build Process Improvements
- Fixed build failures during npm release publishing
- Improved monorepo setup with better build command configuration
- Optimized plugin loading order to ensure proper initialization
Impact Summary
Strapi v3.0.0-alpha.12.2 represents a significant architectural improvement with the relocation of relation management logic to hooks, providing better organization and maintainability. This change, while breaking, sets the foundation for more robust relation handling in the future.
The release addresses several critical issues that affected day-to-day usage, particularly around permissions management and relation handling. Users should no longer experience disappearing permissions after server restarts or data loss when updating related content.
For MongoDB users, the addition of authentication source and SSL configuration options in the admin panel removes the need for manual configuration, making secure database connections more accessible.
The UI improvements, including the redesigned locale selector and various CSS fixes, enhance the overall user experience in the admin panel. Meanwhile, developers will appreciate the addition of ESLint and Prettier for code quality and the switch to GraphQL Playground for API exploration.
Overall, this release balances architectural improvements with practical bug fixes and quality-of-life enhancements, making it a worthwhile upgrade despite the breaking change.
Full Release Notes
💥 Breaking change
- [Framework] Move business logic to manage relations inside the hooks (#1157) @Aurelsicoko
💅 Enhancement
🐛 Bug fix