Open stygmate opened 7 months ago
Hrmm, how does django handles that for you? I assumed strawberry.enum_value
would be incompatible with django so I never tried to use it TBH
@bellini666
It work. But...
TypeDeBien.choices
contains:
[("EnumValueDefinition(value=('App', 'Appartment'), deprecation_reason='because', directives=(), description='the best field !')",
'Appartment'),
('Oth', 'Other')]
So... it work but the db code used by Django may be the string containing the EnumValueDefinition... So... it don't really work 😅
Any workaround to add descriptions to enum_values ? (i need to document conditionally required fields when certain values are choosen)
Any workaround to add descriptions to enum_values ? (i need to document conditionally required fields when certain values are choosen)
That's a good question! Probably we would need to change strawberry itself to support adding those without actually changing the value itself.
@patrick91 any ideas here?
Hi, Any news ?
description
anddeprecation_reason
parameters of enums values are not used when enums are created from TextChoicesField. Only the global enum description is used.example:
the schema produced only include the global description but not the value description or the deprecation reason.
Upvote & Fund