-
Notifications
You must be signed in to change notification settings - Fork 93
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 getInstance as a way to do mapping. #642
Comments
Hi @patope . We can look into how to make this plugable. Maybe you can provide more detail on your use case ? What are you trying to do ? |
Hi! I'm trying to use java.util.Currency type on input type. By default jsonb cannot deserialize this type. I tried to define JsonbCustomizer in quarkus, but this does not seem to have any effect
|
Can you share your GraphQLApi code as well ? Maybe we can use See https://quarkus.io/blog/experimental_graphql/#transformation-and-mapping |
Yes. Currency accepts ISO 4217 currency code as string. I want to map these back and forth.
|
Query example
|
What happens if you |
OK, Currency has a You data class will then look like this:
|
Will that work for you ? |
gives
|
yes. Thanks! |
Hi @patope So the fix was not as simple as initially thought, mostly because
Unfortunately you are going to need both annotations, but that does work. The This is the
I hope this will work for you. I will play a bit more to see if I can make this simpler somehow, but so far this is the easiest. Let me know. Cheers |
@phillip-kruger This will work for me. Thanks! |
Great. Changes should make it into Quarkus 1.12.1.Final. |
JsonB is on static field on execution service. I'd like to use quarkus customized jsonb bean instance instead.
https://github.com/smallrye/smallrye-graphql/blob/master/server/implementation/src/main/java/io/smallrye/graphql/execution/ExecutionService.java#L55
The text was updated successfully, but these errors were encountered: