Atm Info.selected_fields
expose only the graphQL CamelCase of the fields, would be nice to expose the python_name
in snake_case as well.
Also InlineFragment
doesn't have the name
attribute like SelectedField
and FragmentSpread
. This makes a little difficult to iter:
for field in info.selected_fields:
if isinstance(field, SelectedField) or isinstance(field, FragmentSpread):
print(field.name, camel_to_snake(field.name))
P. S. the docs is not correct: it says only SelectedField
instead is a union Union["SelectedField", "FragmentSpread", "InlineFragment"]
...
See Discord thread.
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