If order of executed functions will change, there can be thrown foreign key constraint condition -> I need to execute mutations like DELETE CASCADE...
l
Lenny
09/30/2020, 2:35 PM
The actual graphql executor comes from graphql-Java, and I’m sure it’s spec-compliant and runs mutations in sequence, top to bottom.
But if you need transactionality, you should really wrap these up in a single mutation
d
Dariusz Kuc
09/30/2020, 5:10 PM
if you use
graphql-kotlin-spring-server
then by default yes they will execute sequentially, that being said - as was pointed above I’d highly recommend to refactor your schema to expose single mutation that handles all of that
Dariusz Kuc
09/30/2020, 5:11 PM
*you could manually manage transaction around the whole request but I think it would be much simpler in single mutation