Skip to content

mergeDeep behaviour with undefined values changed in 10.6.2 #7011

@angrykoala

Description

@angrykoala

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 yarn 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 version 10.6.1 of @graphql-tools/utils, undefined values are ignored from mergeDeep. For example:

mergeDeep([{a:"dsa"}, {a:"dd", b: 1}, undefined])

Returns { a: 'dd', b: 1 }

In version 10.6.2 and beyond, the same input returns undefined

To Reproduce Steps to reproduce the behavior:

In version 10.6.2:

mergeDeep([{a:"dsa"}, {a:"dd", b: 1}, undefined])

Returns undefined

Expected behavior

To return the same as 10.6.1:

{ a: 'dd', b: 1 }

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