Update an existing resource (full replacement)
Sends a PUT request to replace an existing resource entirely. Use PATCH (patchResource) for partial updates.
Type of the input data
Type of the response data
API endpoint URL including resource ID
Complete resource data
Promise resolving to the updated resource
const user = await updateResource<UserInput, User>('/api/users/123', { name: 'Jane Doe', email: 'jane@example.com'}); Copy
const user = await updateResource<UserInput, User>('/api/users/123', { name: 'Jane Doe', email: 'jane@example.com'});
Update an existing resource (full replacement)
Sends a PUT request to replace an existing resource entirely. Use PATCH (patchResource) for partial updates.