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
Smokescreen support for nested eager loading is quite good; each relation can define multiple nested eager loads that will be passed to eloquent. However if your transformer uses nested data without includes then there needs to be way to define top level eager loading.
eg
Events check their calendar for permissions do decide what fields can show in the transformer. So even though I’m not including the calendar I need to eager load it for the permissions check.
Solution
Minor update 2.0.0 -> 2.1.0:
Add a new property to the transformer for default eager loads that just get merged in with the ones that resolve from requested includes
The text was updated successfully, but these errors were encountered:
I’ve 100% needed this - will save us from putting it on the model which has felt pretty dirty (in some instances... though perfectly reasonable in others) especially given that the eager loads required may depend on the endpoint / direction that's being hit. I'm curious how this works with nested transformers (if at all).
Problem
Smokescreen support for nested eager loading is quite good; each relation can define multiple nested eager loads that will be passed to eloquent. However if your transformer uses nested data without includes then there needs to be way to define top level eager loading.
eg
Events check their calendar for permissions do decide what fields can show in the transformer. So even though I’m not including the calendar I need to eager load it for the permissions check.
Solution
Minor update
2.0.0
->2.1.0
:The text was updated successfully, but these errors were encountered: