Commit 9d752b8
committed
fix(products): tolerate explicit null values on filter update
## Context
The values argument of UpdateProductFilter is nullable, and graphql-ruby
passes an explicitly-null argument through to the resolver as nil with
the key present.
## Description
Mapping nil to input hashes raised a NoMethodError, turning a malformed
payload into an internal error. A null values list now reaches the
validation layer and fails with value_is_mandatory like an empty one.1 parent 5972621 commit 9d752b8
2 files changed
Lines changed: 9 additions & 1 deletion
File tree
- app/graphql/mutations/product_filters
- spec/graphql/mutations/product_filters
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
0 commit comments