I am Django developer so for the first time I got my hands on vue and graphql, I don't know how exactly to deal with this error.
Here is my code, probably something is wrong in my query,
<template>
<section>
<div class="home">
<h2>hiii</h2>
<div v-for="i in allposts" :key="i.id">
<ul>
<li>
<h3>hey</h3>
<strong>{{id}}</strong>:
<span>{{title}}</span>
</li>
</ul>
</div>
</div>
</section>
</template>
<script>
import gql from "graphql-tag";
const PostQuery = gql`
query allposts {
allPosts {
id
title
}
}
`;
export default {
props: [],
data() {
return {
allposts: []
};
},
apollo: {
allposts: PostQuery
}
};
</script>
I can see the data is fetched successfully
Can anyone please guide me what I am doing wrong here?
Thanks in advance.

