parse-community / parse-community/parse-server
afterSave Webhook consumes event and afterSave trigger in cloud code does not run
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
Issue Description
If afterSave on a class is handled both using cloud code AND afterSave webhook on the same class, then the webhook will consume the event and the afterSave trigger in the cloud code will not be triggered. Is this the expected behaviour or is it a bug?
In case there is a limitation that on the same class a trigger can only be implemented in cloud code OR webhook, then it would be very helpful if this would be explicitly mentioned in the documentation.
Steps to reproduce
Set up an afterSave cloud code "Parse.Cloud.afterSave(Parse.User....."
Set up an afterSave webhook on the _User class
Sign up a new user.
Actual Outcome
The webhook is triggered as expected but the afterSave cloud code is not triggered
(If the webhook is removed or disabled then the cloud code afterSave is correctly triggered)
Expected Outcome
afterSave Webhook AND cloudcode afterSave trigger would both run when a new user signs up.
Environment
Server
- Parse Server version: 5.2.3
- Operating system: Linux
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local
Database
- System (MongoDB or Postgres): MongoDB
- Database version: 3.0
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Parse.Cloud.afterSave entry point and the afterSave webhook handling for the _User class, then reproduce the behavior described against Parse Server 5.2.3 with MongoDB. Done means both handlers run for one signup, or the documentation clearly states that only one handler is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100