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 master FF for review #18445

Merged
merged 42 commits into from Jan 21, 2019

Conversation

Projects
None yet
4 participants
@kshinn
Copy link
Contributor

commented Jan 15, 2019

@Arachnid Here is your PR with master merged in. There are some updates to internal/ethapi/api.go that I made in the last commit to match other design changes I was seeing in when I merged in master. Those changes should be isolated to the last commit in case they need to be peeled off.

Arachnid added some commits Oct 13, 2018

Arachnid and others added some commits Oct 17, 2018

Update common/types.go
Co-Authored-By: Arachnid <arachnid@notdot.net>
Kris Shinn

@Arachnid Arachnid referenced this pull request Jan 15, 2019

Closed

GraphQL API #17903

func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs) (hexutil.Uint64, error) {
return DoEstimateGas(ctx, s.b, args, rpc.PendingBlockNumber)
return s.doEstimateGas(ctx, s.b, args, rpc.PendingBlockNumber)

This comment has been minimized.

Copy link
@gballet

gballet Jan 17, 2019

Member

@Arachnid I would like you to confirm this change. My understanding reading your PR was that you wanted to make DoCall and DoEstimate independent. And in fact, this is what is currently breaking the build. Could you and @kshinn clarify what you want to do here?

This comment has been minimized.

Copy link
@kshinn

kshinn Jan 17, 2019

Author Contributor

This was one of the changes I made to bring this inline with the direction of the design of the rest of the calls (delegating to a private method). If the intent was to move away from that direction, then the changes I made in the last commit can be omitted.

This comment has been minimized.

Copy link
@Arachnid

Arachnid Jan 17, 2019

Contributor

@kshinn This breaks existing code (per the build):

# github.com/ethereum/go-ethereum/graphql
graphql/grahpql.go:894:30: undefined: ethapi.DoCall
graphql/grahpql.go:915:14: undefined: ethapi.DoEstimateGas

Would you mind either reverting the change or fixing that code? I'm okay with either if @gballet is.

This comment has been minimized.

Copy link
@kshinn

kshinn Jan 17, 2019

Author Contributor

Don't mind at all. I'll play with getting this working and push and update to this branch.

This comment has been minimized.

Copy link
@gballet

gballet Jan 17, 2019

Member

I'm fine either way, as long as it works.

@Arachnid

This comment has been minimized.

Copy link
Contributor

commented Jan 21, 2019

@gballet I think we're ready to go here!

@gballet
Copy link
Member

left a comment

LGTM

@gballet gballet added this to the 1.9.0 milestone Jan 21, 2019

@gballet gballet merged commit f91312d into ethereum:master Jan 21, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@gballet

This comment has been minimized.

Copy link
Member

commented Jan 21, 2019

Done, thanks for your impressive work and patience!

@hadv hadv referenced this pull request Jan 24, 2019

Closed

GraphQL API #89

@Arachnid

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2019

I've written up a draft EIP for standardising this functionality here: https://github.com/Arachnid/EIPs/blob/graphql/EIPS/eip-draft-graphql.md

denis-papyrus pushed a commit to papyrusglobal/go-ethereum that referenced this pull request Mar 12, 2019

GraphQL master FF for review (ethereum#18445)
* Initial work on a graphql API

* Added receipts, and more transaction fields.

* Finish receipts, add logs

* Add transactionCount to block

* Add types  and .

* Update Block type to be compatible with ethql

* Rename nonce to transactionCount in Account, to be compatible with ethql

* Update transaction, receipt and log to match ethql

* Add  query operator, for a range of blocks

* Added ommerCount to Block

* Add transactionAt and ommerAt to Block

* Added sendRawTransaction mutation

* Add Call and EstimateGas to graphQL API

* Refactored to use hexutil.Bytes instead of HexBytes

* Replace BigNum with hexutil.Big

* Refactor call and estimateGas to use ethapi struct type

* Replace ethgraphql.Address with common.Address

* Replace ethgraphql.Hash with common.Hash

* Converted most quantities to Long instead of Int

* Add support for logs

* Fix bug in runFilter

* Restructured Transaction to work primarily with headers, so uncle data is reported properly

* Add gasPrice API

* Add protocolVersion API

* Add syncing API

* Moved schema into its own source file

* Move some single use args types into anonymous structs

* Add doc-comments

* Fixed backend fetching to use context

* Added (very) basic tests

* Add documentation to the graphql schema

* Fix reversion for formatting of big numbers

* Correct spelling error

* s/BigInt/Long/

* Update common/types.go

* Fixes in response to review

* Fix lint error

* Updated calls on private functions

* Fix typo in graphql.go

* Rollback ethapi breaking changes for graphql support
Co-Authored-By: Arachnid <arachnid@notdot.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.