-
Notifications
You must be signed in to change notification settings - Fork 184
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
Handling decimals with longer than 6 scale? #464
Comments
This is currently not possible. On the AIOHTTPTransport, we have the There is no corresponding parameter to change the Please check if the PR #465 works for you. |
This should work. We do plan to use AIOHTTPTransport, but haven't migrated to it yet. Any chance you could also add this to RequestsHTTPTransport as well? Thanks for the prompt response! |
Of course! It's done in PR #466 |
This works great for me. I really appreciate it. Looks good! |
Is there a timeline on when the next release will be that will include these changes? |
It's included in the pre-release v3.6.0b1 |
Thank you. I tried our the pre-release build and it works great for deserializing a decimal from the response by passing However, I was not able to serialize any Decimal type since it is not supported it seems. Got the error: I was able to get past this by converting the Decimal to a string since my target API accepts Decimals are strings though. Thanks again. |
Hi,
We came across an issue where the API is returning decimals that can fit into a Decimal with 28 precision, and 10 scale. Because GQL is returning the JSON converted response, the number gets converted to a Python Float and precision is lost. Is there any way to get the raw result using GQL so that we can parse the json ourselves? Or is there any other method to override the json converter to use json.loads() with the parse_float parameter to load it as a Decimal without precision loss?
The text was updated successfully, but these errors were encountered: