10000 Avoid loading attribute mutators when using sparse fieldset · Issue #241 · laravel-json-api/laravel · GitHub
[go: up one dir, main page]

Skip to content
Avoid loading attribute mutators when using sparse fieldset #241
Open
@freestyledork

Description

@freestyledork

I know the current version only filters the output for sparse fields. I was wondering if there is an easy fix to avoid loading mutator attributes. I have a few attributes on my models with some complex logic that are getting ran every request when it's not needed resulting in a lot of extra database hits and performance slowdowns. I've tried messing with eager loads, but that gets messy quick. I am open to other solutions, perhaps proxy models? I would prefer keep the calls clean if at all possible.

Any advice is appreciated.
Thanks

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

      0