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
This is when hitting the endpoint /api/notifications?page[offset]=0&page[limit]=50&include=subject (extreme to be able to properly see uneager loaded relations).
There is improvement to be made, the difference between this endpoint and the others, is that the N+1 queries are mainly coming from the subject polymorphic relationship, for example subject.tags or subject.discussion.tags. Best way to go about it is to provide a loadMorph method to the ApiController extender to allow extensions (such as tags) to eager load the relations necessary.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum.
In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!
Split off from flarum/framework#2637
This is when hitting the endpoint
/api/notifications?page[offset]=0&page[limit]=50&include=subject
(extreme to be able to properly see uneager loaded relations).There is improvement to be made, the difference between this endpoint and the others, is that the N+1 queries are mainly coming from the
subject
polymorphic relationship, for examplesubject.tags
orsubject.discussion.tags
. Best way to go about it is to provide aloadMorph
method to the ApiController extender to allow extensions (such as tags) to eager load the relations necessary.The text was updated successfully, but these errors were encountered: