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

feat: Add a new beforeLiveQueryEvent trigger #9445

Draft
wants to merge 3 commits into
base: alpha
Choose a base branch
from

Conversation

codeKonami
Copy link

Pull Request

Issue

Closes: #9431

Approach

I added a beforeLiveQueryEvent trigger which allows the user to modify the updated object before it is passed to the LiveQuery server (via PubSub). It is a cloned version of the object so it won't modify the one passed to the afterSave trigger.

I've added an option which I'm not really convinced. You can set the context of the request to req.context.preventLiveQuery === true to prevent the publish to be made by the Parse Server and so limiting some network and CPU consumption depending on some business logic.

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK

Copy link

Thanks for opening this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new trigger beforeLiveQueryEvent
2 participants