diff --git a/docs/Getting-Started/Run-Docker-Image.md b/docs/Getting-Started/Run-Docker-Image.md index 2cb2d94d6e..675fef456a 100644 --- a/docs/Getting-Started/Run-Docker-Image.md +++ b/docs/Getting-Started/Run-Docker-Image.md @@ -214,11 +214,11 @@ Where `myauthconfig.toml` is the credentials file and `path` is the absolute pat ## Exposing Ports -Expose ports for P2P peer discovery, metrics, and HTTP and WebSockets JSON-RPC. This is required to use the +Expose ports for P2P peer discovery, GraphQL, metrics, and HTTP and WebSockets JSON-RPC. This is required to use the defaults ports or specify different ports (the equivalent of specifying the [`--rpc-http-port`](../Reference/Pantheon-CLI-Syntax.md#rpc-http-port), [`--p2p-port`](../Reference/Pantheon-CLI-Syntax.md#p2p-port), [`--rpc-ws-port`](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-port), -[`--metrics-port`](../Reference/Pantheon-CLI-Syntax.md#metrics-port), and [`--metrics-push-port`](../Reference/Pantheon-CLI-Syntax.md#metrics-push-port) -options). +[`--metrics-port`](../Reference/Pantheon-CLI-Syntax.md#metrics-port), [`--graphql-http-port`](../Reference/Pantheon-CLI-Syntax.md#graphql-http-port), +and [`--metrics-push-port`](../Reference/Pantheon-CLI-Syntax.md#metrics-push-port) options). To run Pantheon exposing local ports for access: ```bash diff --git a/docs/Pantheon-API/GraphQL.md b/docs/Pantheon-API/GraphQL.md index 458258a557..68235fa486 100644 --- a/docs/Pantheon-API/GraphQL.md +++ b/docs/Pantheon-API/GraphQL.md @@ -7,6 +7,7 @@ GraphQL can reduce the overhead needed for common queries. For example, instead block, GraphQL can obtain the same result with a single query for the entire block. The GraphQL implementation for Ethereum is described in the [schema](https://github.com/PegaSysEng/pantheon/blob/master/ethereum/graphqlrpc/src/main/resources/schema.graphqls). +The GraphQL service is enabled using the [command line options](../Pantheon-API#enabling-api-access). !!! note GraphQL is not supported over WebSockets. diff --git a/docs/Reference/Pantheon-CLI-Syntax.md b/docs/Reference/Pantheon-CLI-Syntax.md index fb54393ebf..8f19b789c0 100644 --- a/docs/Reference/Pantheon-CLI-Syntax.md +++ b/docs/Reference/Pantheon-CLI-Syntax.md @@ -143,6 +143,80 @@ The path to the genesis file. !!!note This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#custom-genesis-file). + +### graphql-http-cors-origins + +```bash tab="Syntax" +--graphql-http-cors-origins= +``` + +```bash tab="Example Command Line" +--graphql-http-cors-origins="http://medomain.com","https://meotherdomain.com" +``` + +```bash tab="Example Configuration File" +graphql-http-cors-origins=["http://medomain.com","https://meotherdomain.com"] +``` + +Comma separated origin domain URLs for CORS validation. The default is none. + +### graphql-http-enabled + +```bash tab="Syntax" +--graphql-http-enabled +``` + +```bash tab="Example Configuration File" +graphql-http-enabled=true +``` + +Set to `true` to enable the GraphQL HTTP service. +The default is `false`. + +### graphql-http-host + +```bash tab="Syntax" +--graphql-http-host= +``` + +```bash tab="Example Command Line" +# to listen on all interfaces +--graphql-http-host=0.0.0.0 +``` + +```bash tab="Example Configuration File" +graphql-http-host="0.0.0.0" +``` + +Host for GraphQL HTTP to listen on. +The default is 127.0.0.1. + +To allow remote connections, set to `0.0.0.0` + +!!!note + This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#exposing-ports). + +### graphql-http-port + +```bash tab="Syntax" +--graphql-http-port= +``` + +```bash tab="Example Command Line" +# to listen on port 6175 +--graphql-http-port=6175 +``` + +```bash tab="Example Configuration File" +graphql-http-port="6175" +``` + +Specifies GraphQL HTTP listening port (TCP). +The default is 8547. Ports must be [exposed appropriately](../Configuring-Pantheon/Networking/Configuring-Ports.md). + +!!!note + This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#exposing-ports). + ### host-whitelist ```bash tab="Syntax"