peco icon indicating copy to clipboard operation
peco copied to clipboard

Query data with GraphQL

Open egoist opened this issue 7 years ago • 0 comments

https://github.com/egoist/graphql-aot

Example ./theme/layouts/index.vue:

<template>
  <div>
    <div v-for="page in pages">{{ page.title }}</div>
  </div>
</template>

<script>
const { data: { pages } } = graphql`
  pages {
    title
    body
  }
`

export default {
  data() {
    return { pages }
  }
}
</script>

egoist avatar May 07 '18 15:05 egoist