Add support for autoloading nested related objects on ingredients#72
Open
Add support for autoloading nested related objects on ingredients#72
Conversation
tvdeyen
reviewed
Jul 20, 2023
Member
tvdeyen
left a comment
There was a problem hiding this comment.
Nice. I think the specs fail because we now always return public version elements.
This adds a `.preload_relations` object to serializers and leverages that and the Rails preloader service object to preload ActiveRecord object graphs below the related object of ingredients.
See stas/jsonapi.rb#91 for details on what these fix.
aab986e to
4a273fb
Compare
3 tasks
tvdeyen
reviewed
Nov 8, 2024
| ) | ||
| end | ||
|
|
||
| def preload_ingredients(scope) |
Member
There was a problem hiding this comment.
We removed essence support. This can probably be removed now.
| end | ||
|
|
||
| # These overrides have to be in place until | ||
| # https://github.com/stas/jsonapi.rb/pull/91 |
Member
There was a problem hiding this comment.
since this has been merged, can this be removed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This takes the capabilities from AlchemyCMS/alchemy_cms#2523 and allows pre-loading object graphs on ingredient's related objects.