Need to configure your backend?See Build a Backend →
データの削除
DELETEリクエスト
APIエンドポイント経由でアイテムを削除するには:
import { del } from 'aws-amplify/api';
async function deleteItem() { try { const restOperation = del({ apiName: 'myRestApi', path: 'items/1', }); await restOperation.response; console.log('DELETE call succeeded'); } catch (e) { console.log('DELETE call failed: ', JSON.parse(e.response.body)); }}