2022-09-08 17:05:16 +02:00

45 lines
888 B
Vue

<template>
<div>
<div>my groups</div>
<group-teaser />
<br />
<br />
<group-card :items="responseGroupListQuery" />
</div>
</template>
<script>
import GroupTeaser from '~/components/Group/GroupTeaser.vue'
import GroupCard from '~/components/Group/GroupCard.vue'
import { groupQuery } from '~/graphql/groups.js'
export default {
name: 'MyGroups',
components: {
GroupTeaser,
GroupCard,
},
data() {
return {
responseGroupListQuery: [],
}
},
methods: {
async groupListQuery() {
try {
const response = await this.$apollo.query({
query: groupQuery,
})
this.responseGroupListQuery = response.data.Group
} catch (error) {
this.responseGroupListQuery = []
} finally {
this.pending = false
}
},
},
created() {
this.groupListQuery()
},
}
</script>