Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Multiple mutations in one request #423

Answered by BlasiusSecundus
cleanoxi asked this question in Q&A
Discussion options

You must be logged in to vote

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).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oliemansm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #423 on December 19, 2020 20:20.