dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Feature Request - Pre-mutate lambda Hook

Open jdgamble555 opened this issue 2 years ago • 2 comments

Currently the Lambda Web Hooks worth AFTER the mutation has already been completed:

https://dgraph.io/docs/graphql/lambda/webhook/

https://discuss.dgraph.io/t/feature-request-lambda-pre-hooks/15626

I don't feel like typing out the myriad of things this would solve. An after mutation hook does not give access to the original data, does not allow you to do custom constrains, custom mutations before the original mutation, etc, etc....

This would allow us to write our own security. All other relational databases have this.

The argument for the old DGraph employees was that it slows down the mutation. This was ridiculous.

https://discuss.dgraph.io/t/webhook-lambda-on-add-update-delete-mutations/12904/7

This one feature alone solves 20 problems at once and puts DGraph back in the hands of the database creators.

J

jdgamble555 avatar Aug 26 '22 00:08 jdgamble555

See recent post https://discuss.dgraph.io/t/need-clarification-what-webhooks-are-for-in-dgraph/18422/3

rderbier avatar Mar 24 '23 15:03 rderbier

I totally agree that this would highly increase the ability of using the auto-generated GraphQL requests without having to gun down everything with custom resolvers! Even more so, as it seems like that there is everything in place already!

Furthermore, error handling in webhooks is nonexistent. If something fails my frontend will never even notice! So even for webhooks which do not alter the database, they are basically useless unless you trigger some subscription or sth...

Poolshark avatar Mar 24 '23 17:03 Poolshark