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

Add Currency default value handling #734

Open
nithy1603 opened this issue Aug 19, 2024 · 1 comment · May be fixed by #742
Open

Add Currency default value handling #734

nithy1603 opened this issue Aug 19, 2024 · 1 comment · May be fixed by #742

Comments

@nithy1603
Copy link

nithy1603 commented Aug 19, 2024

Please add feature to handle default values for Currency in GraphQL Schema.

Description:

We have defined a custom scalar for currency extending graphql-java-extended-scalars Currency scalar. A typemapping for the custom scalar is provided for the graphqlcodegen-maven-plugin as follows

java.util.Currency

An input type MoneyInput is defined in the graphql schema with a default value for currency
input MoneyInput {

currency: CustomCurrency! = "USD"

value: Decimal!

}

The compilation give the following error:
incompatible types: java.lang.String cannot be converted to java.util.Currency

@srinivasankavitha
Copy link
Contributor

Thanks for creating this issue. Will fix in the next release.

@dwilkolek dwilkolek linked a pull request Sep 8, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants