Remove edges from objective group query

This commit is contained in:
Ramon Wenger 2021-06-07 14:57:19 +02:00
parent f1db43a092
commit 3156b2c482
2 changed files with 11 additions and 23 deletions

View File

@ -69,8 +69,8 @@
const variables = {id: this.objectiveGroup}; const variables = {id: this.objectiveGroup};
const data = store.readQuery({query, variables}); const data = store.readQuery({query, variables});
if (data.objectiveGroup && data.objectiveGroup.objectives) { if (data.objectiveGroup && data.objectiveGroup.objectives) {
data.objectiveGroup.objectives.edges.push({ data.objectiveGroup.objectives.push({
node: objective, ...objective,
__typename: 'ObjectiveNode' __typename: 'ObjectiveNode'
}); });
store.writeQuery({query, variables, data}); store.writeQuery({query, variables, data});

View File

@ -3,27 +3,15 @@ query ObjectiveGroupQuery($id: ID!) {
objectiveGroup(id: $id) { objectiveGroup(id: $id) {
...ObjectiveGroupParts ...ObjectiveGroupParts
objectives { objectives {
edges { id
node { text
id hiddenFor {
text id
hiddenFor { name
edges { }
node { visibleFor {
id id
name name
}
}
}
visibleFor {
edges {
node {
id
name
}
}
}
}
} }
} }
} }