Skip to content

Handling decimals with longer than 6 scale? #464

Closed
@mnguyenssnc

Description

@mnguyenssnc

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions