This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
Multiple mutations in one request #423
-
I have multiple mutations of the same kind that I want to execute in a single transaction. Can I do this? `type Mutation { mutation updateDetails { |
Beta Was this translation helpful? Give feedback.
Answered by
BlasiusSecundus
Jun 17, 2020
Replies: 1 comment
-
Yes, you can do that using aliases: https://graphql.org/learn/queries/#aliases mutation updateDetails {
king: editAuthor(author: "Stephen King", book: "Castle Rock")
vonnegut: editAuthor(author: "Kurt Vonnegut", book: "Cat's Cradle")
} Note that, however, this will not be a single transaction (one may succeed or fail independently from the other). |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
oliemansm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can do that using aliases: https://graphql.org/learn/queries/#aliases
Note that, however, this will not be a single transaction (one may succeed or fail independently from the other).