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

Support ArgumentValue wrapper for input parameters in Kotlin generator #1575

Open
bczerwinski-equinix opened this issue Oct 30, 2024 · 1 comment

Comments

@bczerwinski-equinix
Copy link

Kotlin input parameters generation does not support useWrapperForNullableInputTypes configuration property (https://github.com/kobylynskyi/graphql-java-codegen/blob/main/src/main/java/com/kobylynskyi/graphql/codegen/kotlin/KotlinGraphQLTypeMapper.java#L193).
Looking at the comments mentioned below I am not sure if adding support for this flag is planned?
Kotlin does not provide org.springframework.graphql.data.ArgumentValue functionality - only kind of an equivalent of the optional pattern. ArgumentValue provides both nullable optional and omitted flag features that could be very useful in input parameters.

The optional specification of Java SE8 is not applicable to scala and kotlin. In the functional programming, the data class has accurately described the data type. Therefore, I think only Java needs it.

Originally posted by @jxnu-liguobin in #1450 (comment)

@rwo-trackunit
Copy link
Contributor

I omitted Kotlin, when implementing, because of the above comment, and because there is no build-in wrapper like ArgumentValue to wrap it with.

ArgumentValue is specifically supported in graphql-java project, which means the serializer knows how to handle it. If we make our own, it will not be able to (de)serialize it. So that is not an option.

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