The article was interesting and the one problem faced was that , when I visit an article it throw undefined error. This is due to the delay getting the data from apollo. So I go with computed property and check the the null with v-if in the template
here is then snippets I used
computed:{
getArticle() {return this.article.data.attributes ? this.article.data : null }
},
in the template
<div
v-if="getArticle"
id="banner"
class="uk-height-small uk-flex uk-flex-center uk-flex-middle uk-background-cover uk-light uk-padding"
:data-src="api_url + getArticle.attributes.image.data.attributes.url"
uk-img
>
<h1 v-if="getArticle">{{ getArticle.attributes.title }}</h1>
</div>
Hope this will help someone.
Thank you, good work
Manoj from India
[Blog](https:// javascriptsu.wordpress.com)