Magidoc

ResourceAssignments
Object

Fields

#

_id

ID !
Non-null

The id of the resource assignment

workspace

ID !
Non-null

The workspace id

projectId

The project id

phaseId

The project phase id

resourceId

ID !
Non-null

The resource (user or placeholder) id

startDate

Non-null

The start date of the resource assignment

endDate

Non-null

Create a resource assignment with SPECIFIC end date logic:

ALWAYS set endDate to the NEXT DAY after the actual assignment end This is NOT the actual last day - it's the day AFTER

Examples: • 1-day assignment (Jan 1) → endDate = 2025-01-02T00:00:00.000Z • 2-day assignment (Jan 1-2) → endDate = 2025-01-03T00:00:00.000Z • Assignment from Jan 1-5 → endDate = 2025-01-06T00:00:00.000Z

Database requirement - do not use actual end date.

allocationType

The allocation type (required).

Could be ONLY 'hoursPerDay' or 'fixedHours'. Works in pair with 'fixedDisplayType'. You should ALWAYS PASS 'fixedDisplayType' when you pass 'allocationType'.

assignmentType

The assignment type

allocationValue

The allocation value. This is mostly just user defined value.

hoursPerDay

The hours per day

fixedHours

The fixed hours

confirmed

Whether the assignment is confirmed

fixedDisplayType

The fixed display type (required). How the allocation value is displayed for user.

Could be ONLY 'hours' or 'days' or 'percentages'. Works in pair with 'allocationType'. You should ALWAYS PASS 'allocationType' when you pass 'fixedDisplayType'.

deleted

Non-null

Whether the assignment is deleted

notes

The notes

leaveTypeId

The leave type id

leaveType

The leave type

timeCategoryId

Time category ID. Resolve category names via getTimeCategories before asking the user.

timeCategoryIsTimeOff

Time-off classification for viewers without workspace category access.

source

Optional product surface that owns this assignment.

sourceKey

Stable identity within the owning product surface.

linkedCalendarEvent

Linked calendar event when time-off is synced to the employee calendar

Usages

#

References

#

  • Field getResourceAssignment from Query
  • Field getResourceAssignments from Query
  • Field createResourceAssignment from Mutation