Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AlexStansfield
Copy link
Contributor

@AlexStansfield AlexStansfield commented Feb 21, 2025

I'm not sure how this hasn't affected us before, but today we found that we were unable to remove an object with schema field from an item by setting it to null (as works with scalar fields). Instead it throws an error.

I found two places that caused an issue:

  1. collectNested: tries to collect the properties of the object but throws an error as it's null so has no properties
  2. convertNulls: skips the field if it has a schema, so never removes it

I've made this PR to resolve the issue. On my testing it seems to work fine, the unit tests also all pass.

However I'm not sure if this change might have some hidden impact I'm not aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant