Partially update an existing resource
Sends a PATCH request to update only specified fields of a resource. Use PUT (updateResource) for complete replacement.
Type of the input data
Type of the response data
API endpoint URL including resource ID
Partial resource data to update
Promise resolving to the updated resource
const user = await patchResource<UserInput, User>('/api/users/123', { email: 'newemail@example.com' // Only update email}); Copy
const user = await patchResource<UserInput, User>('/api/users/123', { email: 'newemail@example.com' // Only update email});
Partially update an existing resource
Sends a PATCH request to update only specified fields of a resource. Use PUT (updateResource) for complete replacement.