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.
GraphQLScalarTypeclass as shown here. This way you can create a scalar that can accept, for example,"NaN", "Infinity" and any floating point value as valid values. - Daniel Rearden