node.js - I want to delete the author with its _id. While querying its not showing any error but deletion does not take place from the database -
here using promised-mongo. while querying working fine particular data doesnot gets deleted database. can me?
const mutation = new graphqlobjecttype({ name: "mutations", fields: { deletedonor: { type: donor, args: { _id: { type: graphqlstring } }, resolve: function(rootvalue, args) { let donor = object.assign({}, args); return donorscollection.remove({_id:donor._id}) .then(_ => donor); } } } });
Comments
Post a Comment