There is no standard to represent NaN and INFINITY in neither the Graphql and also in JSON.
In JavaScript, JSON.stringify(0/0)
and JSON.stringify(1/0)
will just return string null
.
It cause little trouble when I am providing GraphQL endpoint with Java backed. My value could be any valid Double
in Java.
@GraphQLQuery
private Double precentage;
I have few workarounds and I could patch it in a setter which I am doing. Just wonder if there is a de-facto standards to handle it in a nicer way.