[async, promise] db쿼리와 처리 순서
0. 문제 코드 Mutation: { add: async (_, args) => { let name = args.device_name let address = args.device_address let pile_max = args.pile_max const sqlQuery = "INSERT INTO DEVICES (DEVICE_NAME, DEVICE_ADDRESS, PILE_MAX) VALUES (?,?,?)"; let recall_id; await db.query(sqlQuery, [name,address,pile_max], (err, result) => { if (err) { console.log(err); }else{ recall_id = result.insertId; console.log("Inr..
2023. 7. 23.