Delete data
DELETE data
1import { del } from 'aws-amplify/api';2
3async function deleteTodo() {4 try {5 const restOperation = del({6 apiName: 'todo-api',7 path: '/todo/1'8 });9 await restOperation.response;10 console.log('DELETE call succeeded');11 } catch (error) {12 console.log('DELETE call failed: ', error);13 }14}