Added Graphql options (#1496)

* Added GraphQL options
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
MadelineMurray 6 years ago committed by Sally MacFarlane
parent d325989017
commit 56cd2f695e
  1. 6
      docs/Getting-Started/Run-Docker-Image.md
  2. 1
      docs/Pantheon-API/GraphQL.md
  3. 74
      docs/Reference/Pantheon-CLI-Syntax.md

@ -214,11 +214,11 @@ Where `myauthconfig.toml` is the credentials file and `path` is the absolute pat
## Exposing Ports ## 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), 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), [`--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) [`--metrics-port`](../Reference/Pantheon-CLI-Syntax.md#metrics-port), [`--graphql-http-port`](../Reference/Pantheon-CLI-Syntax.md#graphql-http-port),
options). and [`--metrics-push-port`](../Reference/Pantheon-CLI-Syntax.md#metrics-push-port) options).
To run Pantheon exposing local ports for access: To run Pantheon exposing local ports for access:
```bash ```bash

@ -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. 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 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 !!! note
GraphQL is not supported over WebSockets. GraphQL is not supported over WebSockets.

@ -143,6 +143,80 @@ The path to the genesis file.
!!!note !!!note
This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#custom-genesis-file). 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=<graphQLHttpCorsAllowedOrigins>
```
```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=<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=<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 ### host-whitelist
```bash tab="Syntax" ```bash tab="Syntax"

Loading…
Cancel
Save