I try to make GraphQL work on Geth (version 1.10.1-stable) without any success.

I try to run this query, but I only get 404.

curl -H "Content-Type: application/json" -d '{ "query": "{syncing{startingBlock currentBlock highestBlock}}"}' http://localhost:8545/graphql

...also tried port 8547 and without /graphql but no success. Am I missing something?

I run Geth using the following config:

# config.toml
IPCPath = "geth.ipc"
HTTPHost = ""
HTTPPort = 8545
HTTPCors = ["*"]
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["web3", "eth"]
WSHost = ""
WSPort = 8546
WSOrigins = ["*"]
WSPathPrefix = "/ws"
WSModules = ["web3", "eth"]
GraphQLVirtualHosts = ["localhost"]
GraphQLCors = ["*"]

1 Answer 1


You need to launch the node with --graphql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.