A 404 is now returned for a show request for a record that can not be found.
This is a bug fix for this error in PostgreSQL:
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
This is accomplished by ensuring fields used in sorting are also selected. This should be a transparent change.
🚀 This large release contains a substantial re-architecture of the internals, especially the process of finding resources and their included resources, and caching.
🆕 Please see https://jsonapi-resources.com/v0.10/guide/whats_new.html for more details.
⬆️ An upgrade guide has been added at https://jsonapi-resources.com/v0.10/guide/upgrade_guide.html
🚀 This release adds support for Rails 6.
In addition projects using the
Rails.application.config.relative_url_rootwill now generate the correct urls. A bug related to a nil
request.protocolwas also fixed in the same code.
🚀 This release has reduced the number of memory allocations in a request, which results in faster responses and significantly fewer calls to the garbage collector.
A new warning has been added if
find_fragmentsdetects that the results returned are not normalized. This can happen if the
recordsmethod was overridden and joins in a to_many relationship. This warning can be disabled with the
🛠 Fix issues with resource definition order and initializers
🚀 This release fixes the following issues:
🐎 Using the Rails url_helpers resulted in a significant performance penalty. The functionality has been reverted back to generating links by string buildup. An alternate method of detecting unrouted resources was added so warnings about missing links are preserved.
An issue where deleting a relationship destroys the related resource, without checking dependency. #1260
In addition a configuration option,
default_exclude_links, was added to globally control link generation.
🐛 Bug Fixes
- 🛠 Fixes an issue where relationship route helper names were not always unique.
- 🔗 Links are now generated using the routes. Warnings are emitted if the route helper is not found.
- Resource and relationship links can be excluded
- Singleton resources now need to be declared. This allows the correct routing to be enforced and provides a way to resolve the correct id based on the context.
- some internal cleanup of naming around Show Relationship operations. Should be transparent unless these methods are patched in your project
⚠ Warning: Possible breaking changes
- 🚀 This release ensures that links are generated from the routes. Previously it was possible for the system to create links that did not actually have a route. If routes are missing a warning will now be output.
- Singleton resources must be declared
🚀 This release fixes an issue with trying to access a resource that may not be available due to permission issues.
Memory usage and execution times have been improved, especially on uncached resources.