Skip to content

Latest commit

 

History

History
 
 

nested-mutation-or-query

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Nested mutations

Sometimes, nested mutations and queries are very handy and can help to keep code more encapsulated

This example will allow mutation like

mutation {
  book(bookId: 2) {
    edit(name: "Lord of the Rings") {
      id
      name
    }
  }
}

instead of

mutation {
  editBook(bookId: 2, name: "Lord of the Rings") {
    id
    name
  }
}