diff --git a/client/src/components/objective-groups/NewObjectiveGroupWizard.vue b/client/src/components/objective-groups/NewObjectiveGroupWizard.vue
index 92ac1f8a..84497951 100644
--- a/client/src/components/objective-groups/NewObjectiveGroupWizard.vue
+++ b/client/src/components/objective-groups/NewObjectiveGroupWizard.vue
@@ -3,7 +3,7 @@
Lernziele: {{title}}
-
+
{
- try {
- const query = ROOM_ENTRIES_QUERY;
- const variables = {slug: this.room.slug};
- const data = store.readQuery({query, variables});
- if (data.room && data.room.roomEntries) {
- data.room.roomEntries.edges.unshift({
- node: roomEntry,
- __typename: 'RoomEntryNode'
- });
- store.writeQuery({query, variables, data});
- }
- } catch (e) {
- // Query did not exist in the cache, and apollo throws a generic Error. Do nothing
+ // todo: make update work
+ // update: (store, {data: {addObjectiveGroup: {objectiveGroup}}}) => {
+ // const query = MODULE_DETAILS_QUERY;
+ // const variables = {slug: this.$route.params.slug};
+ // const data = store.readQuery({query, variables});
+ // debugger;
+ // if (data.module && data.module.objectiveGroups) {
+ // data.module.objectiveGroups.edges.push({
+ // node: objectiveGroup,
+ // __typename: 'ObjectiveGroupNode'
+ // });
+ // store.writeQuery({query, variables, data});
+ // }
+ //
+ // }
+ refetchQueries: [{
+ query: MODULE_DETAILS_QUERY,
+ variables: {
+ slug: this.$route.params.slug
}
- }
+ }]
+
}).then(() => {
this.hideModal();
});