Skip to content

Instantly share code, notes, and snippets.

@praveenweb
Last active January 30, 2019 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save praveenweb/7a19a94cc1ce0235650abf20032b4e26 to your computer and use it in GitHub Desktop.
Save praveenweb/7a19a94cc1ce0235650abf20032b4e26 to your computer and use it in GitHub Desktop.
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment