-
Notifications
You must be signed in to change notification settings - Fork 726
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
GraphQLNullable<Decimal> conversion #3305
Comments
Can you provide a code sample of what you are doing when this conversion occurs? That is definitely very odd behavior... |
let decimal: Decimal = 0.84 |
@AnthonyMDev waiting for your response, FloatingType values are wrongly presiced. |
Hi there. Sorry for the slow response, we've been off for the holidays. Now that we are back, we've got a lot of catch up to do this week. But we'll get someone to look into this further as soon as we can. If you end up finding anything else out in the mean time, please update us here! |
Hi @AnthonyMDev , not only GraphQLNullable, while sending Decimal(decimal: 0.83) is converted into 8.0299999999999994 |
@satyaaiosdev Can you provide a sample project that demonstrates this issue? In my testing using |
MocupInput(__data: ApolloAPI.InputDict(data: [ "currentBalance": GraphQL.Decimal(decimal:0.83)])) Than while sending this input request query creating like this |
@satyaaiosdev sorry for the delayed response ive been out of office dealing with a death in the family. so you are using |
Closing this under the assumption it is no longer an issue. Feel free to reopen with additional info if needed. |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better. |
Question
The conversion of Decimal to GraphQLNullable resulted in odd behavior, such as the addition of extra numbers to the value as shown below.
Take GraphQLNullable, for instance.A portion (0.84) receives 0.83999999999999997
However, after conversion, 0.84 was our need.How can one resolve this kind of problem?
The text was updated successfully, but these errors were encountered: