Skip to content
GraphQL

Mutations

Write data and return the result.

#mutation#write

Code

graphql
mutation CreateBook($input: CreateBookInput!) {
  createBook(input: $input) {
    id
    title
    author {
      name
    }
  }
}

mutation UpdateBook($id: ID!, $title: String) {
  updateBook(id: $id, title: $title) {
    id
    title
  }
}