Skip to content

mergeDeep behavior changed in 10.10.0 for null values #8197

@pbomb

Description

@pbomb

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox

    Make sure to fork this template and run npm run generate in the terminal.

    Please make sure the GraphQL Tools package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

In 10.9.1 and earlier, passing in a object with a property whose value is null no longer overrides the property value from previous objects.

To Reproduce Steps to reproduce the behavior:

mergeDeep([{ a: foo }, { a: null }])
This results in { a: foo } now

Expected behavior

It used (and is expected) to result in { a: null }

Environment:

  • OS: MacOS
  • @graphql-tools/utils: 10.10.0+
  • NodeJS: 24.14.0

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions