Closed cngai closed 3 months ago
Hey @bellini666 - would you mind giving this PR a review when you get the chance? Really appreciate it!
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.98%. Comparing base (
23c4126
) to head (f624d12
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks @bellini666 !!
Description
If
GENERATE_ENUMS_FROM_CHOICES
is set toTrue
, mutations with enum input values will resolve the input type as an enum. When the input is parsed, it tries to save the field as an enum instead of a string value, causing Django to throw a ValidationError"Value 'ExampleEnum.VALUE' is not a valid choice."
. This PR addresses this issue by parsing the enum and returning the enum value.Types of Changes
Issues Fixed or Closed by This PR
Fix https://github.com/strawberry-graphql/strawberry-django/issues/491
Checklist