Skip to content

Eager-load multiple relationships through @with #1132

@chescos

Description

@chescos

Is your feature proposal related to a problem? Please describe.

It seems that it is currently not possible to eager-load multiple relationships through the @with directive.

Describe the solution you'd like

I think it should either be possible to use the @with directive more than once on a single field, or the @with directive should accept an array of relationships.

  • Using the @with directive multiple times: I'm not sure if it's currently possible to use any directive more than once on a single field. Is this being prevented for some reason?
  • Accepting an array of relations through the @with directive: The question is how to handle scopes then, should they be part of the relations array (e.g relations: ["relation" => ["scopeOne", "scopeTwo"]]?

Describe alternatives you've considered

I haven't found any alternative to overcome this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions