<template>
  <div>
    <h3>Authors</h3>
    <ul>
      <li v-for="item in author" :key="item.id">
        <nuxt-link :to="`/article/${item.id}`">
          {{ item.name }}
        </nuxt-link>
      </li>
    </ul>
  </div>
</template>

<script>
import author from '~/apollo/queries/fetchAuthor'
export default {
  apollo: {
    author: {
      prefetch: true,
      query: author
    }
  },
  head: {
    title: 'Authors of Blog'
  }
}
</script>