Add apollo base for module
This commit is contained in:
parent
5d48f42ffe
commit
b99d354284
|
|
@ -4,13 +4,32 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Module from '@/components/Module.vue';
|
import Module from '@/components/Module.vue';
|
||||||
|
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
apollo: {
|
||||||
|
moduleQuery: {
|
||||||
|
query: MODULE_DETAILS_QUERY,
|
||||||
|
variables: {
|
||||||
|
slug: 'video'
|
||||||
|
},
|
||||||
|
fetchPolicy: 'network-only',
|
||||||
|
// manual: true,
|
||||||
|
// result({data, loading}, networkStatus) {
|
||||||
|
// if (!loading) {
|
||||||
|
// this.module = data.modules.edges
|
||||||
|
// this.categories = data.categories.edges.map(entry => entry.node)
|
||||||
|
// this.modules = data.userModules.edges.map(entry => ({'status': entry.node.status, ...entry.node.module}))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Module
|
Module
|
||||||
},
|
},
|
||||||
|
|
||||||
data: () => {
|
data() {
|
||||||
return {
|
return {
|
||||||
module: {
|
module: {
|
||||||
title: 'Mein neues Umfeld',
|
title: 'Mein neues Umfeld',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue