I created a wrapper around BigDecimal. Basically just putting a bunch of friendlier methods on top of it. I use it for some of my POJO's fields, and it generates a schema like this
# Built-in java.math.BigDecimal
scalar BigDecimal
input BestDecimalInput {
scale: Int!
}
Ideally, when I go to make a query I'd be able to treat it the same as BigDecimal. I have a constructor
public BestDecimal(double val) {
super(val);
}
which I'd hope it would allow me to use a regular floating point number in my query/mutation, but it doesn't seem to work that way. Basically if the below is a BestDecimal object, I want this to work just as if it were a BigDecimal.
myquery(number: 10){
whatever
}