You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have a model in Django with a field that has choices. Only, because I'm Icelandic, those choices might be in Icelandic and contain utf-8 characters. Generating an enum from my model will fail.
This will then fail in graphql.utils.assert_valid_name.assert_valid_name at schema evaluation since to_const doesn't handle converting unicode characters to ascii: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "A_HAFNARFJARÐARKAUPSTAÐUR" does not.
I really doubt I'm the only one running into this. Most people just handle this stuff differently I suppose? Manually switch out code, or use an actual Enum() in the choices?
My proposed solution is to use the unidecode package, specifically designed for this. I'll throw together a PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
stale commentedon Jan 2, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
ekampf commentedon Feb 8, 2020
FYI fixed on #1080