Created
March 30, 2018 18:37
-
-
Save SaraVieira/f9dbc7da25bc22c6cd207bccf47aaf54 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"> | |
<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