Books GraphQL Api

GraphQL Queries

{{ query.title }}

{{ query.code }}

GraphQL Mutations

Create Author

mutation {
    createAuthor(name: "{{ author.name }}", age: {{ author.age }}, nationality: "{{ author.nationality }}") {
        id
        name
        age
        nationality
    }
}

Create Book

mutation {
    createBook(title: "{{ book.title }}", publicationYear: {{ book.publicationYear }}, genre: "{{ book.genre }}", authorId: {{ book.authorId }}) {
        id
        title
        publicationYear
        genre
        author {
          id
          name
          age
          nationality
        }
    }
}

{{ mutation.title }}

{{ mutation.code }}