documentation/question/feature: multiple mutations
What are you missing in the docs
multiple mutations in a single transaction. Support for this seems to be all over the place in my google search for various frameworks. I mean doing something like this.
mutation first {
someMutation {
id: 123
}
}
mutation second {
someMutation {
id: 456
}
}
What would happen? can it be made to be a single transaction?
I know this is phrased as a question, but I always have the opinion, most questions, if not all can be answered by documentation ;). How to in the mutation would be nice. At the very least there should be some documentation of what happens.
Is there any update on this? Can multiple mutations be executed in a single transaction?
Hi - you can do multiple fields in one query or operation. If they have the same name, you will need to alias it as shown below.
query {
A: hello
B: hello(name:"wdqw")
}
If you want multiple query blocks in the same request, you will have to specify the operation name to execute in this transaction.