3 ms·
On that last bit, we recently added actions: https://hasura.io/blog/introducing-actions/ https://hasura.io/blog/introducing-actions/ Writes (mutations) are del
by tango12 7y ago
On that last bit, we recently added actions: https://hasura.io/blog/introducing-actions/ https://hasura.io/blog/introducing-actions/
Writes (mutations) are delegated to a REST endpoint, the GraphQL mutation response can be synchronously (blocking mutation) or asynchronously consumed (mutation + subscription).
- kandros 7y agoThe sync part is very interesting, I like that it’s happening after the mutation so that Im not forced to reimplement the graphql types myself. Will give it a try, thanks
- tango12 7y agoYep! The GraphQL resolution logic and the permissions get reused automatically.
- kandros 7y agoI gave it a try, to be honest, I feel it too cumbersone, I expected it to use already available mutations not just copying existing types. What I really want/need is custom logic that run IN the resolvers of already available query/mutations with the request as input and the possibility to either return an error or modify the payload before it hit the database but I know is still in preview, will check it again when released
- lukaspili 7y agoAgree. This is one of the issue we have with Hasura and it's what made us switch to Postgraphile.