-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid loading attribute mutators when using sparse fieldset #241
Comments
I attempted to come up with a temporary solution for not loading sparse fields. Extending the Create a
Then from every custom models resource class I just call the @lindyhopchris Do you see any obvious issues with this solution? |
Hey! Sorry for not replying to this earlier. I see no problem with that as a temporary solution. I'm planning a permanent solution for the sparse fieldsets as part of all the upgrades I'm working on at the moment. |
Hello @lindyhopchris, is this still being worked on? I don't see any mention of it on your "Big Board of Everything" at https://github.com/orgs/laravel-json-api/projects/1 Thanks for all your work ! |
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
The text was updated successfully, but these errors were encountered: