Closed igrishaev closed 2 years ago
UPD: The tests pass locally but CI fails because of some troubles with my personal CircleCI account.
The CI is a pain, as I didn't even have admin access to the repo to fix things while I was still at Walmart.
I'll check this out and run tests locally.
Thank you @hlship for merging this! You're right about mapv
, good catch indeed.
Hi Walmart Team!
In Clashapp.co, we've faced an issue when the
::null
values remain in the response, for example:We expected the whole submap to collapse into
nil
because of the nested::null
value. At least it was so before we updated from 1.0 to 1.1.While investigating that, I noticed that only happens to the fields which are of the union type. In our case, the field was the
VideoCommentActivity
which is a member of the globalActivity
type:The problem is, the
can-reach-null-producer?
function in thecom.walmartlabs.lacinia.schema
namespaces doesn't take unions into account and skips them. As a result, it always returns False, so the following check:will always be False as well, and the null values won't be collapsed.
With this PR, the function takes into account the members of the union fields and processes them. You're welcome to review and share you feedback. Also, should I add any tests for that, please give me a hit what would the best way of doing that (what do you expect and where, etc).
Thank you, Ivan.