An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
besu/docs/Pantheon-API/GraphQL.md

1.1 KiB

description: How to access the Pantheon API using GraphQL

GraphQL over HTTP

GraphQL can reduce the overhead needed for common queries. For example, instead of querying each receipt in a block, GraphQL can obtain the same result with a single query for the entire block.

GraphQL Requests with Curl

Pantheon JSON-RPC API methods with an equivalent GraphQL query include a GraphQL request and result in the method example.

!!! example The following syncing request returns data about the synchronization status. bash curl -X POST -H "Content-Type: application/json" --data '{ "query": "{syncing{startingBlock currentBlock highestBlock}}"}' http://localhost:8547/graphql

GraphQL Requests with GraphiQL App

The third-party tool GraphiQL provides a tabbed interface for editing and testing GraphQL queries and mutations. GraphiQL also provides access the Pantheon GraphQL schema from within the app.

GraphiQL