kimf
03/24/2017, 4:01 PMnilan
03/24/2017, 4:22 PMnilan
03/24/2017, 4:22 PMnilan
03/24/2017, 4:23 PMnilan
03/24/2017, 4:23 PMnilan
03/24/2017, 4:23 PMnilan
03/24/2017, 4:23 PMnilan
03/24/2017, 4:23 PMkimf
03/24/2017, 4:24 PMnilan
03/24/2017, 4:25 PMkimf
03/24/2017, 4:25 PMnilan
03/24/2017, 4:26 PMstlbucket
03/24/2017, 4:33 PMid_${thing.id}: deleteThing(
id: "${thing.id}",
) {
id,
},
}
function deleteThings(things){
const mutationSet = things.reduce(
(acc, item) => {
const thisMutation = buildMutation(item);
return acc.concat(thisMutation)
},
''
)
const mutation = {
${mutationSet}
}
console.log('MUTATION SET', mutation);
return client.mutate(mutation)
.then(result => {
return result
})
}
module.exports = deleteThingsstlbucket
03/24/2017, 4:35 PMnilan
03/24/2017, 4:36 PM