Skip to content

Commit

Permalink
added graphql support (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasMassart committed May 24, 2019
1 parent 3cbd77c commit 9dbdf6d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions block-explorer-light/default.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ server {
proxy_set_header Connection "Upgrade";
}

# a common HTTP GraphQL entrypoint
location /graphql {
proxy_pass http://rpcnode:8547;
proxy_redirect off;
proxy_set_header Host $host;
}

# a generic HTTP RPC entrypoint pointing to each available node
location ~* /(?<serviceName>(.*))/jsonrpc {
# Use Docker default local network DNS IP as resolver
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ services:
"--rpc-ws-enabled",
"--rpc-ws-host=0.0.0.0",
"--rpc-ws-port=8546",
"--graphql-http-enabled",
"--graphql-http-host=0.0.0.0",
"--graphql-http-port=8547",
"--graphql-http-cors-origins=*",
"--host-whitelist=*"]
volumes:
- public-keys:${PANTHEON_PUBLIC_KEY_DIRECTORY}
Expand Down
4 changes: 4 additions & 0 deletions docker-compose_poa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ services:
"--rpc-ws-api=WEB3,ETH,NET,${QUICKSTART_POA_API-ibft}",
"--rpc-ws-host=0.0.0.0",
"--rpc-ws-port=8546",
"--graphql-http-enabled",
"--graphql-http-host=0.0.0.0",
"--graphql-http-port=8547",
"--graphql-http-cors-origins=*",
"--host-whitelist=*"]
volumes:
- public-keys:${PANTHEON_PUBLIC_KEY_DIRECTORY}
Expand Down
1 change: 1 addition & 0 deletions list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if [ ${#dots} -gt ${maxRetryCount} ]; then
else
echo "JSON-RPC HTTP service endpoint : http://${HOST}:${explorerMapping##*:}/jsonrpc"
echo "JSON-RPC WebSocket service endpoint : ws://${HOST}:${explorerMapping##*:}/jsonws"
echo "GraphQL HTTP service endpoint : http://${HOST}:${explorerMapping##*:}/graphql"
echo "Web block explorer address : http://${HOST}:${explorerMapping##*:}"
echo "****************************************************************"
fi

0 comments on commit 9dbdf6d

Please sign in to comment.