Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Query data with GraphQL #22

Open
egoist opened this issue May 7, 2018 · 0 comments
Open

Query data with GraphQL #22

egoist opened this issue May 7, 2018 · 0 comments

Comments

@egoist
Copy link
Contributor

egoist commented May 7, 2018

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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant