
mutation createStaffDocument(
  $staffId: UUID!
  $staffName: String!
  $documentId: UUID!
  $status: DocumentStatus!
  $documentUrl: String
  $expiryDate: Timestamp
) @auth(level: USER) {
  staffDocument_insert(
    data: {
      staffId: $staffId
      staffName: $staffName
      documentId: $documentId
      status: $status
      documentUrl: $documentUrl
      expiryDate: $expiryDate
    }
  ) 
}

mutation updateStaffDocument(
  $staffId: UUID!
  $documentId: UUID!
  $status: DocumentStatus
  $documentUrl: String
  $expiryDate: Timestamp
) @auth(level: USER) {
  staffDocument_update(
    key: { staffId: $staffId, documentId: $documentId }
    data: {
      status: $status
      documentUrl: $documentUrl
    }
  ) 
}

mutation deleteStaffDocument(
  $staffId: UUID!
  $documentId: UUID!
) @auth(level: USER) {
  staffDocument_delete(key: { staffId: $staffId, documentId: $documentId })
}
