Skip to content
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

Add a Trigger for BeforeUnsubscribe on live queries #7420

Open
3 tasks done
sadortun opened this issue Jun 6, 2021 · 2 comments
Open
3 tasks done

Add a Trigger for BeforeUnsubscribe on live queries #7420

sadortun opened this issue Jun 6, 2021 · 2 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@sadortun
Copy link
Contributor

sadortun commented Jun 6, 2021

New Feature / Enhancement Checklist

Current Limitation

Feature / Enhancement Description

Add a livrQuery trigger similar to BEFORE Subscribe, to get an event when a client unsubscribe from a LiveQuery.

Example Use Case

We need to fetch external data while we have users connected to LiveQuery, and stop fetching data when the client unsubscribe.

Usage example :
https://github.com/GoPlan-Finance/GoPlan-app/blob/master/backend/src/cloud/Assets/liveQueries/AssetPrice.ts#L217

Alternatives / Workarounds

None ;)

3rd Party References

@mtrezza
Copy link
Member

mtrezza commented Jun 6, 2021

Thanks for suggesting, a useful addition!

Can you also open a PR for the docs?

@sadortun
Copy link
Contributor Author

Done.

parse-community/docs#833

@mtrezza mtrezza changed the title [Feature] Add a Trigger for BeforeUnsubscribe on live queries Add a Trigger for BeforeUnsubscribe on live queries Jul 11, 2021
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants