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

Decimal Argument Types #101

Open
batesm opened this issue Dec 12, 2018 · 0 comments
Open

Decimal Argument Types #101

batesm opened this issue Dec 12, 2018 · 0 comments

Comments

@batesm
Copy link

batesm commented Dec 12, 2018

I have been using GraphQL.Net and think it's great but have run into a problem I was hoping you could help me with please?

In my GraphQL schema, if I configure field with an argument of type System.Double defined by the following "arguments" class:-

public class TestArgs
{
public double Score { get; set; }
}

and then execute a GraphQL query on the "Tests" list field to get all instances with the matching Score 1.23:-

{
Tests(Score: 1.23)
{
Id
Score
}
}

I am getting some weird and wonderful floating point conversions when TestArgs is instantiated. The Score property ends up with a value something like 1.28547713E-32

Do you have any advice about this please? What am I missing?

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

No branches or pull requests

1 participant