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

Question: Does GraphQL necessarily needed? #109

Open
aeharvlee opened this issue Apr 1, 2022 · 0 comments
Open

Question: Does GraphQL necessarily needed? #109

aeharvlee opened this issue Apr 1, 2022 · 0 comments

Comments

@aeharvlee
Copy link

I've seen below comments and have a question here.
https://github.com/coinbase/rosetta-ethereum/blob/23561f903bc93d4fa97bebc1fbbe4c7e5b374e5e/ethereum/client.go#L1404-L1410

Actually we can get the balance atomically using ONLY RPC call.
As you can see https://eth.wiki/json-rpc/API#eth_getbalance, eth_getBalance accept second parameter as block number.

If we need to query using block hash,

  • get block by hash and extract block number
  • and use eth_getBalance using block number

The benefit of graphQL here is "it can replace the possible multiple RPC calls to one graphQL call".
So in my opinion, we don't have to use graphQL necessarily (the comment includes "MUST" keyword).

I just wondered MUST keyword at that comment.

@aeharvlee aeharvlee changed the title Is GraphQL is necessarily needed? Does GraphQL necessarily needed? Apr 1, 2022
@aeharvlee aeharvlee changed the title Does GraphQL necessarily needed? Question: Does GraphQL necessarily needed? Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant