Enum values are now checked in json.Unmarshal
- 主要言語
- Go
- スター
- 10.8k
- フォーク
- 1.3k
- 平均マージ
- 2日 36分
- マージ済み PR(30日)
- 26
説明
Checking enum values and returning an error if they are not valid during `json.Unmarshal` is a breaking change. Specifically, `json.Unmarshal` was not previously calling `e.UnmarshalGQL(s)`, which contains the additional check for valid enum values.
The commit: https://github.com/99designs/gqlgen/commit/eed4a10c6b0aa2ed65dc6282bdcbf255264ba624 (`plugin/modelgen/models.gotpl`)
I understand the GraphQL spec requires enums to always contain valid values, and gqlgen is technically released under a `0.x.x` semantic version, so breaking changes may be released at any time. We were unfortunately relying on the non-spec-compliant behavior in our application.
Could I add a config option to gqlgen that optionally disables the enum value checks?
コントリビューションガイド
評価
この issue はまだ評価されていません。