ignormies

Results 27 comments of ignormies

We might just want to implement our own `JSONEncoder` that knows how to deal with Strawberry types

Probably, but only marginally

But here, the use case is explicitly for json, so I think it would be best to do the recursive conversion all the way down the object tree

This should also work with arguments with the same name as Python keywords

Similar in function to #725. Potentially one of the solutions will rely on the other

Would having this be a feature that can be enabled/disabled work?

There's never any harm with opening a PR. We'd love to see what you've got working! There's also another PR out that touches on enum descriptions if you want to...

I think by default `auto()` assigns an integer value to the enum. I wonder if `@strawberry.enum` could define a `_generate_next_value_()` on the wrapped Enum that takes the enum field name...

> What would be advantage of using the name? So, I wasn't aware that `SCREAMING_SNAKE_CASE` was the standard for GraphQL enums. Currently, the json structure I'm trying to migrate to...

My idea was to use something along the lines of the following, but using the `@strawberry.enum` decorator instead of inheritance ```python class AutoName(Enum): def _generate_next_value_(name, start, count, last_values): return name...