File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co
99
1010## Unreleased
1111
12+ ## v15.14.3
13+
14+ ### Fixed
15+
16+ - Serialize ` BackedEnum ` instances by name, not value https://github.com/webonyx/graphql-php/pull/1618
17+
1218## v15.14.2
1319
1420### Changed
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public function serialize($value)
137137 }
138138
139139 if (is_a ($ value , \BackedEnum::class)) {
140- return $ value ->value ;
140+ return $ value ->name ;
141141 }
142142
143143 if (is_a ($ value , \UnitEnum::class)) {
Original file line number Diff line number Diff line change 44
55enum BackedPhpEnum: string
66{
7- case A = 'A ' ;
7+ case A = 'a ' ;
88 case B = 'B ' ;
9- case C = 'C ' ;
9+ case C = 'the value does not really matter ' ;
1010}
You can’t perform that action at this time.
0 commit comments