question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

graphql can't support float.NaN

See original GitHub issue

Hi,this exception is

Can't serialize value (/project/situation/healthSituation/pipelineSituation/sqaleDebtRatio) : Expected type 'Float' but was 'Float'

the java type is float , the value is float.NaN

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fedinskiycommented, Dec 11, 2020

@bbakerman the latest GraphQL specification states, that NaNs should be transformed into nulls(“If result is null (or another internal value similar to null such as undefined or NaN), return null.”). I propose reopening this issue, since right now the java implementation is clearly breaking the specs. UPD: adressed the wrong person at first, now fixed

0reactions
fedinskiycommented, Dec 11, 2020

@bakert oops, my bad, thank you for pointing this 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using nullability in GraphQL
By default, every field in GraphQL is nullable, and you can opt in to mark it non-null. In this article, we'll go over...
Read more >
javascript - NaN type in GraphQL - Stack Overflow
I'm not sure about graphql, but the value NaN is usually of type number; double or float or so. It's not a distinct...
Read more >
Nulls in GraphQL: Cheatsheet - Hasura
Nullability in GraphQL is a controversial topic. Some say constant null checks are a nuisance, while others err on the side of paranoia....
Read more >
parseFloat() - JavaScript - MDN Web Docs
The parseFloat function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or...
Read more >
GraphQL Is Not a Silver Bullet | HackerNoon
GraphQL, by default, has no support for imports. ... PRODUCTS) hidden: String @join__field(graph: PRODUCTS) reviewsScore: Float!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found