.include in LiveQuery

Hey all,

Just wondering if there was any plans to extend .include to Parse Live Query Server, or anyone could point me in the direction of creating a PR. (Relating to this)

Would I just need to .fetch the pointed object prior to _onAfterSave (for subscription.query.include keys)? Or is there a more efficient way to do .include?

If anyone has any suggestions how to get pointers going with LQ, or could point me in the direction of creating a PR, would be greatly appreciated.

Cheers

_onAfterSave looks the right place to fetch the data

1 Like

Thank you @davimacedo. In my PR I ended up creating a new function at _onAfterSave and _onAfterDelete, as for my use case, I also needed .matchesQuery in my LiveQuery (which I acheived by running a query in my afterLiveQueryEvent trigger, but is only required for certain user types).

I am happy to work on a PR for inbuilt support as well, but would adding more database fetches / lookups in LiveQuery lead to too much bottlenecking on systems with many subscriptions?

1 Like

We will take a look at the PR and we can continue the conversation from there.

1 Like