Distelli / graphql-apigen

Generate Java APIs with GraphQL Schemas
Apache License 2.0
66 stars 20 forks source link

Mapping GraphQL Float data type to Double in Java #38

Closed ips219 closed 5 years ago

ips219 commented 5 years ago

According to the specification of graphql-java Float type should mapped as Double.

https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/Scalars.java#L122

The problem actually is that when a getXXX method defined as Float in the GraphQL IDL we get cast exception as the graphql parser stores it as Double.

brimworks commented 5 years ago

Thank you for the contribution!