Created
March 30, 2018 18:40
-
-
Save SaraVieira/8b989a11a46f5af9c2b9fe07e24969a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<ApolloQuery :query="query" :variables="{ name: 'vue' }"> | |
<template slot-scope="{ result: { loading, error, data } }"> | |
<span v-if="loading">Loading...</span> | |
<span v-else-if="error">An error occured</span> | |
<section v-if="data"> | |
<ul v-if="data.allNameses.length"> | |
<li :key="name.id" v-for="name in data.allNameses" > | |
{{name.name}} | |
</li> | |
</ul> | |
<span v-else>No names, oh no :(</span> | |
</section> | |
</template> | |
</ApolloQuery> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to follow your below blog
https://medium.com/yld-engineering-blog/using-vue-with-apollo-65e2b1297592,
currently facing this error
Could you help to understand what I'm missing?
Thanks