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

GraphQL Float is supposed to be double-precision #22

Closed
joffrey-bion opened this issue Mar 17, 2020 · 2 comments · Fixed by #23
Closed

GraphQL Float is supposed to be double-precision #22

joffrey-bion opened this issue Mar 17, 2020 · 2 comments · Fixed by #23
Assignees
Labels
bug Something isn't working

Comments

@joffrey-bion
Copy link
Contributor

joffrey-bion commented Mar 17, 2020

Describe the bug
By default, GraphQL Float type result in a Float in Java.
However, the specification states that Float in GraphQL is a double-precision floating point value, and should therefore be a Double instead (at least by default).

Expected behavior
The property type should be Double in Java for a GraphQL field declared as Float.

Steps to reproduce
Use this schema:

type MyType {
    someFloat: Float
}
@kobylynskyi
Copy link
Owner

@joffrey-bion, thanks for creating this issue.
Will you have time to work on it? If no, then I can pick it up.

@kobylynskyi kobylynskyi added the bug Something isn't working label Mar 17, 2020
@joffrey-bion
Copy link
Contributor Author

I'm taking it, it shouldn't be too long I think. I'll wait for you to merge #21 first, though, as I'll need to update the float default literal as well

kobylynskyi pushed a commit that referenced this issue Mar 17, 2020
The GraphQL specification says that Float type is double-precision.
It is thus effectively equivalent to Java's float.

Resolves:
#22

Co-authored-by: Joffrey Bion <joffrey.bion@booking.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants