Remove edges from objective group query
This commit is contained in:
parent
f1db43a092
commit
3156b2c482
|
|
@ -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});
|
||||||
|
|
|
||||||
|
|
@ -3,28 +3,16 @@ query ObjectiveGroupQuery($id: ID!) {
|
||||||
objectiveGroup(id: $id) {
|
objectiveGroup(id: $id) {
|
||||||
...ObjectiveGroupParts
|
...ObjectiveGroupParts
|
||||||
objectives {
|
objectives {
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
id
|
||||||
text
|
text
|
||||||
hiddenFor {
|
hiddenFor {
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
visibleFor {
|
visibleFor {
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue