graphql: specify Long input and output formats#389
graphql: specify Long input and output formats#389lightclient merged 2 commits intoethereum:mainfrom
Conversation
|
Looks reasonable. Any idea of the scope of the downstream impact? i.e. do you know of anyone we will break? |
|
I also think that if we are going to hex for the longs, we should consider all-hex, or at least align with what the json-rpc results send on a per-field basis. |
Fair enough. json-rpc result sends back hex for every number AFAIK. At least checked all cases where graphql currently returns decimal and they are all returned as hex in json-rpc. Currently their type is |
|
Updated the hive tests as well, PTAL. |
TL;DR After this PR every number field will be hex-formatted. Numeric inputs are flexible and can be provided as number or string.
The spec is vague in defining which inputs are accepted for
Longand how outputs are formatted. I suggest thatLongbehave similar toBigInts in this sense. I.e. be flexible when taking input, but output hex-encoded values. My reasoning is that:Every field with type
Inthas been changed to be aLongfor consistency.Hive tests: ethereum/hive#746