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

Duplicate type generation? #2637

Open
wamdy opened this issue May 16, 2023 · 1 comment
Open

Duplicate type generation? #2637

wamdy opened this issue May 16, 2023 · 1 comment

Comments

@wamdy
Copy link

wamdy commented May 16, 2023

当类型名称中包含Id和Api及Url时,gql生成的类型名称会自动转换大小写为ID,API,URL,当使用autobind绑定类型时,无法识别已有的类型名称,导致重复生成类型,因为Id不等于ID?

Translation: "gqlgen automatically changes the capitalization of the strings 'Id', 'Api', and 'Url' to 'ID', 'API', and 'URL', respectively, when generating type names. However, when using autobind to bind types, it cannot recognize existing type names, which may result in duplicate type generation because 'Id' is not equal to 'ID'."

@kirkhamj16
Copy link

Running into this as well, especially with the added options around initialisms from #2683. It seems that Autobind isn't aware of initialisms at all -- would making it try to match using initialisms (perhaps behind a config option) be a reasonable path to pursue?

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

2 participants