text: import { gql } from '@apollo/client'
  
  export const BOOK_DETAILS = gql`
    fragment BookDetails on Book {
      title
      author {
        name
        born
      }
      published
      id
      genres
    }
  `
  
  export const ALL_AUTHORS = gql`
  query {
    allAuthors {
      name,
      born,
      bookCount
      id
    }
  }
  `
  
  export const ALL_BOOKS = gql`
  query allBooks($author: String, $genre: String) {
    allBooks(author: $author, genre: $genre) {
      ...BookDetails
    }
  }
  
  ${BOOK_DETAILS}
  `
  
  export const ME = gql`
    query me {
      me {
        username
        favouriteGenre
      }
    }
  `
  
  export const FAVOURITE_GENRE = gql`
    query favGenre {
      me {
        favouriteGenre
      }
    }
  `
  
  export const EDIT_AUTHOR = gql`
  mutation changeAuthor($name: String!, $setBornTo: Int!) {
    editAuthor(name: $name, setBornTo: $setBornTo) {
      name
      born
    }
  }
  `
  
  export const ADD_BOOK = gql`
  mutation createBook($title: String!, $published: Int!, $author: String!, $genres: [String!]) {
    addBook(
      title: $title,
      published: $published,
      author: $author,
      genres: $genres
    ) {
      ...BookDetails
    }
  }
  
  ${BOOK_DETAILS}
  `
  
  export const LOGIN = gql`
    mutation login($username: String!, $password: String!) {
      login(username: $username, password: $password) {
        value
      }
    }
  `
  
  
  
  export const BOOK_ADDED = gql`
    subscription {
      bookAdded {
        ...BookDetails
      }
    }
  
    ${BOOK_DETAILS}
  `