Skip to content

v4.0.4

Latest

Choose a tag to compare

@niteshsandal-merge niteshsandal-merge released this 24 Jul 18:39
5433500

Merge Node SDK Release Notes - Version [4.0.4]

Bug Fixes

  • Fixed array query parameters being sent as repeated params instead of comma-separated values
    fixes #157).
    Passing an array to a multi-value query parameter (e.g. expand) previously serialized it as repeated keys
    (?expand=groups&expand=work_location). Merge's backend parses these params as a single CSV value and honors only the last occurrence, so all earlier values were silently dropped — resulting in incomplete data with no error raised. Array query parameters are now joined into a singlecomma-separated value (?expand=groups,work_location). No code changes are required; passing an array now behaves as intended, and the previous string-cast workaround is no longer necessary.
// Previously required a cast to avoid the repeated-param bug:
await merge.hris.employees.list({
  expand: "work_location,groups" as Merge.hris.EmployeesListRequestExpandItem,
});

// Now works as intended:
await merge.hris.employees.list({
  expand: ["work_location", "groups"],
});

// A CSV string continues to work unchanged.
// All forms produce the same request: ?expand=work_location,groups