Add support for eager-loading multiple element types #11055
Unanswered
engram-design
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, eager-loading is limited to a single element type. Whilst this is fine for the most part, some of the more advanced plugins with element relations would be amazing to be able to make use of this.
Navigation
The node (menu item) for a navigation is itself an element, which can be related to other elements such as an entry, asset, etc. Nodes also support custom fields, therefore element fields.
It's currently not possible to eager-load the element, because it could be any element time for the entire navigation's nodes. We would also want to eager load a Node > Entries Field > Assets Field - which I'm sure would get hairy.
Comments
A comment's owner element can also be any element.
Wishlist
A wishlist item has a related element, that you've "favourited", so being able to eager-load that, and any elements within that.
I know there's other fields like the few "link" fields that would also benefit from this.
I'm not sure if this is even possible, or if some adjustments need to be map to the eager-load map function? Thought it worth discussing at least.
Beta Was this translation helpful? Give feedback.
All reactions