-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL Transaction Management #411
Comments
To double confirm you are asking about transaction support for the APIs exposed in the |
Added support for transactions. Let me know if this works for you I still have to expose these APIs in the NodeJS package will do that next. c7ed332 |
Also thanks for the detailed issue I like the feature roadmap to be about what people want and need so insights like this one really help me fill gaps I might have missed. |
@ahobsonsayers let me know if this worked for you? |
Hey @dosco! This is amazing, i had barely opened this issue and you managed to implement my request! I'm gonna give this a try out over the next day or so and will let you know if this solves what i was trying to do. Thanks so much again for being so prompt! |
please try with the new graphjin |
@ahobsonsayers can i close this? |
What would you like to be added:
I would be great if GraphJin had support for managing (opening/committing) SQL transactions. This feature would allow multiple queries and mutations to be executed in series and then committed or rolled back atomically as desired.
There is currently a (highly upvoted) issue open in Hasura for a similar feature (See hasura/graphql-engine#5773), including a PR with an implementation using websockets (See hasura/graphql-engine#3557).
Having this feature in GraphJin would be amazing and i feel would help tackle a lot of use cases that GraphJin cannot currently solve (see example below). Do you think implementing this feature is possible? If so, is it something that might be on your roadmap? If you feel it implementing something is feasible, I might be able to find some time to contribute.
Why is this needed:
I have been using GraphJin for some pretty simple queries and mutations (and its great!), however as I progress with my project, I have noticed that i have wanted to do some more complex operations which I would need transaction control for:
e.g.
Currently, while the above could be done with GraphJin and series of queries/mutations, it would not take place within a transaction, and I want all of the above to be atomic.
The alternative to achieve the above atomically is, instead of using GraphJin, use a database trigger. This is i how i have currently been getting around this problem, but database triggers are difficult to track and maintain, especially as i add increasing numbers to do the things i need to.
Ideally, id like this sort of logic to be in my code rather than in the database, so having transaction control would be invaluable.
The text was updated successfully, but these errors were encountered: