go to post saranraj Rasu · Oct 29, 2019 Thanks for ans Raj. What is use of proposal and i need one my concept is patient does not come hospital he/she is in home itself. practitioner will monitor when patient will go critical position by near by practitioner. So here we need lat/long with patient can you help this?. How we manage
go to post saranraj Rasu · Oct 15, 2019 Yes i wrote MongoDB operation in resolver. The code is following below module.exports.createPatient = function createPatient( root, args, context = {}, info, ) { let { server, version, req, res } = context; console.log('inside the create patient', context.req.body); console.log('context.server.db', context.server.db); let db = context.server.db; let version = context.version; let logger = context.server.logger; return new Promise((resolve, reject) => { db.patients.create(context.req.body, (err, patient) => { console.log('error:', err); console.log('patient:', patient); if (err) { logger.error(err); let error = errorUtils.internal(version, err.message); reject(errorUtils.formatErrorForGraphQL(error)); } else { resolve(patient); } }) }); };