app-sre / qenerate

Code Generator for GraphQL Query and Fragment Data Classes
Apache License 2.0
10 stars 7 forks source link

set allow_population_by_field_name pydantic config #83

Closed chassing closed 1 year ago

chassing commented 1 year ago

Set the Pydantic config allow_population_by_field_name. This allows the initialization of Pydantic classes with either the GQL aliases or the Python class attribute names. This will make it easier to print and copy and paste a Pydantic object to tests, for example.