I'm writing a resolver that involves 1) going over all the fields in the GraphQL query and 2) matching them to their respective Python name. For the current field, Info
very conveniently has both field_name
and python_name
. But while Info.selected_fields
then contains the names of all the children fields in the query, it does not contain their Python names. It would be helpful if the SelectedField
class did contain python_name
as well.
I took a look at the codebase to try and implement this myself, but I couldn't find an immediate way to do so. Maybe this isn't a realistic request. But if the maintainers think it is and could point me in the direction of how to grab the python_name
when generating SelectedField
objects, I'd be happy to do it myself.
If it isn't possible to do this on the SelectedField
class, I'd be just as happy with a general helper function that can convert a Strawberry type's fields between their Python and GraphQL names.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too