We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4e219fa + 886131c commit 3186dd2Copy full SHA for 3186dd2
graphene_pydantic/converters.py
@@ -125,6 +125,8 @@ def convert_pydantic_field(
125
)
126
field_kwargs.setdefault("required", not field.allow_none)
127
field_kwargs.setdefault("default_value", field.default)
128
+ if field.has_alias:
129
+ field_kwargs.setdefault("name", field.alias)
130
# TODO: find a better way to get a field's description. Some ideas include:
131
# - hunt down the description from the field's schema, or the schema
132
# from the field's base model
0 commit comments