Skip to content

Default eager loading #19

@lachlankrautz

Description

@lachlankrautz

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:
  • Add a new property to the transformer for default eager loads that just get merged in with the ones that resolve from requested includes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions