Client generation: Scalar for BigDecimal #1206
Unanswered
huehnerlady
asked this question in
Q&A
Replies: 1 comment 11 replies
-
Hello 👋 I'm thinking we could potentially support it by allowing to specify something like |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
HI,
after being able to generate a client with the help provided here We now run into the issue, that we use java.math.BigDecimal in our GraphQL Schema, created with
com.expediagroup:graphql-kotlin-schema-generator
. We rely here on a central mode, which unfortunately is made out of Groovy classes (We currently have the main lanuage as groovy, but I try to introduce kotlin more and more), so changing BigDecimal is not possible.In the Schema we can see the Scalar:
But when using the graphql-kotlin client generator we end up with that type being just String. I could find a generated class:
Then I tried to use a customScalar:
This seems to create a wrapper class though:
So again that is not the behaviour we want.
When I manually change the type alias to be
java.math.BigDecimal
it all works as expected. So can I somehow say in the config, that I just want a type alias? I was hoping the Comment would help there, as it is generated by graphql-kotlin, but that seems not to be enough?Thanks for your help 🙂
Beta Was this translation helpful? Give feedback.
All reactions