You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment the package has to do quite complex work to get Eloquent to eager load the right paths based on JSON:API include paths. This represents significant complexity in the package implementation.
There is a new feature in Laravel 12 for Eloquent to automatically eager load relations, added via this PR and documented here.
Worth noting, at the time of writing the docs say this feature is in beta awaiting community feedback and might change.
The main limitation at the moment is it'll load all attributes of related models, whereas the aim was to move to only loading specific columns if JSON:API sparse fieldsets have been added.
Note that we wouldn't want to turn this on globally for all models, we'd want to call the specific method on the model or model collection that the JSON:API implementation loads.
The text was updated successfully, but these errors were encountered:
At the moment the package has to do quite complex work to get Eloquent to eager load the right paths based on JSON:API include paths. This represents significant complexity in the package implementation.
There is a new feature in Laravel 12 for Eloquent to automatically eager load relations, added via this PR and documented here.
Worth noting, at the time of writing the docs say this feature is in beta awaiting community feedback and might change.
The main limitation at the moment is it'll load all attributes of related models, whereas the aim was to move to only loading specific columns if JSON:API sparse fieldsets have been added.
Note that we wouldn't want to turn this on globally for all models, we'd want to call the specific method on the model or model collection that the JSON:API implementation loads.
The text was updated successfully, but these errors were encountered: