Commit 5979c49
committed
refactor(products): keep relation names on GraphQL errors
## Context
GraphQL product mutations remapped model association errors to the id
input fields (billable_metric_id, product_category_id) through a
SurfaceErrorFields concern. The FE owns its error-display mapping, so
the neutral relation name is enough on GraphQL — while REST keeps
translating to the _code params its callers actually send, where the
contract is public.
## Description
Drop the SurfaceErrorFields concern: GraphQL validation errors now
carry the relation name emitted by the model. The REST boundary keeps
its billable_metric_code and product_category_code mapping.1 parent 86242c9 commit 5979c49
4 files changed
Lines changed: 4 additions & 31 deletions
File tree
- app/graphql/mutations/products
- spec/graphql/mutations/products
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
0 commit comments