parse-community / parse-community/parse-server

Add a Trigger for BeforeUnsubscribe on live queries

Open
#7,420 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Parse Server's existing LiveQuery BeforeSubscribe trigger path and compare it with the usage example in AssetPrice.ts. Determine how client unsubscribe events are represented and where a corresponding BeforeUnsubscribe trigger belongs. Done means the trigger fires on client unsubscribe and supports cleanup such as stopping external data fetching.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.