GraphQL: Fix the long literal passed into the nested variable#26730
GraphQL: Fix the long literal passed into the nested variable#26730Lucshine wants to merge 1 commit intoethereum:masterfrom Lucshine:graphql/nested-long-var
Conversation
|
I don't get it. Where does float come from? |
Because the parameters in the variables section are passed in json format, in the golang json library parser, an unquoted numeric literal is always parsed as float64. |
holiman
left a comment
There was a problem hiding this comment.
Technically, this "makes sense" to me. However, you are adding a non-quoted decoding-format for uint64, and that might not be according to spec.
Typically, anything which can become "very large number" needs to be a quoted string, since javascript only have 53 bit integers natively.
So the implementation looks good to me, but I don't want us to introduce a spec-violation, need to look into that.
|
According to spec, https://eips.ethereum.org/EIPS/eip-1767 Fo the type |
|
GraphQL requests are parsed here: go-ethereum/graphql/service.go Line 45 in 13ef21d Instead of trying to make it work with |
|
The problem is not about variables being nested. It's that some arguments have the type |
|
Closing this in favour of #26984. (If I misunderstood something, please let me know) |
|
Should be #26894
|
This commit fixes a bug in graphql when querying with variables and having nested types in variables.
Expected behaviour
Actual behaviour
# {"errors":[{"message":"unexpected type float64 for Long"}],"data":{}}