Skip to content
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

Use database transactions for Graphql operations #3182

Open
cesarvarela opened this issue Oct 25, 2024 · 0 comments
Open

Use database transactions for Graphql operations #3182

cesarvarela opened this issue Oct 25, 2024 · 0 comments
Labels
Stack: Back End The issue pertains to the back end

Comments

@cesarvarela
Copy link
Collaborator

Use database transactions for Graphql operations

Once the migration to our graphql API is completed, we'll have complete control over every interaction with the database, which, among other things, allows us to improve the atomicity of the graphql mutations.

One option is to use MongoDB transactions:

https://www.mongodb.com/docs/drivers/node/current/fundamentals/transactions/

We could create a session in the graphql context and share it in every Mongodb operation.

@cesarvarela cesarvarela added the Stack: Back End The issue pertains to the back end label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stack: Back End The issue pertains to the back end
Projects
None yet
Development

No branches or pull requests

1 participant