updateProjectOtherCosts Mutation
Adds, updates, or removes one project other-cost entry and recalculates derived totals. UPDATE clears description or categoryId when omitted, but preserves omitted date, type, and recurrence values. Requires workspace-admin or project-owner access. ADD and UPDATE require name and amount; UPDATE and REMOVE require costId. Duplicate IDs and invalid categories are rejected; negative amounts are allowed as credits.
Arguments
#
costId
The other-cost line id. Required for UPDATE and REMOVE; supplied by clients on ADD for optimistic rendering, generated when omitted
color
Hex color code for the cost line. Optional — falls back to the default project color when omitted
amount
The cost amount. Required on ADD and on UPDATE. Any number is accepted; negative amounts record credits that offset other costs on the project
description
Description for the cost line. On UPDATE this is not a partial field: omitting it clears any existing description
categoryId
Time category id; must belong to the project workspace. On UPDATE this is not a partial field: omitting it clears any existing category
Response
#
Returns Project .
Example
#
updateProjectDescription
updateProjectOwner