parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.94k stars 4.78k forks source link

afterSave Webhook consumes event and afterSave trigger in cloud code does not run #9436

Open apederse opened 3 hours ago

apederse commented 3 hours ago

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

Database

parse-github-assistant[bot] commented 3 hours ago

Thanks for opening this issue!