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 data = store.readQuery({query, variables});
if (data.objectiveGroup && data.objectiveGroup.objectives) {
data.objectiveGroup.objectives.edges.push({
node: objective,
data.objectiveGroup.objectives.push({
...objective,
__typename: 'ObjectiveNode'
});
store.writeQuery({query, variables, data});

View File

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