Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codegen Output Types should always be named after the function #519

Open
TomFaulkner opened this issue Aug 13, 2024 · 0 comments
Open

Codegen Output Types should always be named after the function #519

TomFaulkner opened this issue Aug 13, 2024 · 0 comments

Comments

@TomFaulkner
Copy link

Currently if the output of two generated queries are the same the output type is re-used, though the name seems to fit the first function that used that type.

This leads to problems when changing one of the queries using that output. The output type will change, so imports using it will break.

Since I prefer to typehint most of my applications whenever I change an existing query I have to change unrelated code that used the same output types. The name being unrelated to the query also ends up really awkward at times.

A current example: I have two unrelated models that both have queries that output `{id, name}'. Because I just dropped an output from one of them, they both now use that pattern, so the output is named after the output of another table.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant