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

fixed generating a description to golang comments for enum type #780

Merged
merged 1 commit into from
Jul 8, 2019

Conversation

zdebra
Copy link
Contributor

@zdebra zdebra commented Jul 7, 2019

Hello, I've created a bug fix for plugin modelgen. I and my team have recently started using the tool in production and we really like it.

I wanted to dig into the code by submitting an easy fix of something that I found out. When models are generated from GraphQL schema, a description is used as golang comments. It works fine for all GraphQL types but enum. It worked in a way that the description was formatted into a single word CamelCased. I've added test cases and fixed it by removing calling go in a template pipe.

Those tests from me could be more sophisticated as I am checking only for the number of words in a comment.

Let me know if this is welcomed. I would like to contribute more.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 61.677% when pulling 446c3df on zdebra:master into 414a4d3 on 99designs:master.

@vektah
Copy link
Collaborator

vektah commented Jul 8, 2019

😂 thanks.

@vektah vektah merged commit d2c5bf2 into 99designs:master Jul 8, 2019
@vektah vektah added the v0.9.2 label Aug 8, 2019
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
fixed generating a description to golang comments for enum type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants