0
To avoid looking after a ghost, I prefer to check if the notion of a transaction can exist in GraphQL .
Let’s say I have this:
mutation save_changes {
change01 {
}
change02 {
}
}
Is there a possibility for change01
to be rolled back if change02
fails?
2
1 Answer
Reset to default
0
GraphQL is the API technology while transaction is a DB technology. As GraphQL is agnostic to the datasource(s) used to retrieve and persist data , so it is quite normal that GraphQL does not define anything related to the DB transaction and pretty sure it will never to that in the future. It is up to the developer to implement how the transactional behaviour to be.
Not the answer you're looking for? Browse other questions tagged
or ask your own question.
or ask your own question.
Only commit the transaction when all operations succeed or roll it back if any of your operation fails.
1 hour ago
Are you saying that it is supported by default?
36 mins ago
|