mirumee / ariadne-codegen

Generate fully typed Python client for any GraphQL API from schema, queries and mutations
BSD 3-Clause "New" or "Revised" License
259 stars 33 forks source link

Custom operations generated files doesn't import custom scalars #311

Open Cikmo opened 3 weeks ago

Cikmo commented 3 weeks ago

When using custom operations, the files generated doesn't include the import statements for custom scalars that have been defined.

Cikmo commented 2 weeks ago

Someone deleted their comment, but to give some more context, I have this in my pyproject.toml:

[tool.ariadne-codegen.scalars.DateTime]
type = "pydantic.AwareDatetime"

When not using custom operations, this works great. However when it generates the files for the custom operations, this does not get imported in those spesific files, so it is impossible to import the module without errors.