-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Kotlin: Add option to add defaults to nullable fields #863
Conversation
Welcome, it looks good, Let's wait until the test passes. 👍🏻 |
@jxnu-liguobin a bit confused as to why that build's failing, all of the constants seem to be in the right place, am I missing something ? Edit: Oh, I think I've got it, there's a version dependency there. It's not pulling the library from the project, it's pulling from the published project, so I need to land the change to the library before I can change the plugin 😢 |
...gin/src/main/java/io/github/kobylynskyi/graphql/codegen/gradle/GraphQLCodegenGradleTask.java
Outdated
Show resolved
Hide resolved
src/main/java/com/kobylynskyi/graphql/codegen/kotlin/KotlinGraphQLCodegen.java
Outdated
Show resolved
Hide resolved
@zmack please change the target branch to develop (according to CONTRIBUTING.md#development-process) |
a49128a
to
8710bb6
Compare
Oh welp, apologies, I totally missed that. Updated the target branch and rebased and that took care of all my testing woes 🥳 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zmack looks good now!
@kobylynskyi is the sonar report failure due to one of my changes or unrelated? |
Nope, that's because Sonar run is not supported in PRs. You are good. |
Sorry for necroposting, but do you intentionally not add default null in parameterized input template because of something, or this is a bug? |
Description
This adds the option to have kotlin classes generated with constructors that set the default value of nullable types set to null.
This would end up generating classes to the tune of
rather than
This ends up being convenient in Kotlin as it makes using constructors more terse and to some degree obviates the need for generating builders.
Please let me know if I missed adding anything here.
Thank you.
Changes were made to: