dgraph
dgraph copied to clipboard
Feature Request - Pre-mutate lambda Hook
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
See recent post https://discuss.dgraph.io/t/need-clarification-what-webhooks-are-for-in-dgraph/18422/3
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...