diff --git a/packages/web/docs/src/content/api-reference/gateway-cli.mdx b/packages/web/docs/src/content/api-reference/gateway-cli.mdx index 9ed955a31..556312577 100644 --- a/packages/web/docs/src/content/api-reference/gateway-cli.mdx +++ b/packages/web/docs/src/content/api-reference/gateway-cli.mdx @@ -27,18 +27,27 @@ Usage: hive-gateway [options] [command] Federated GraphQL Gateway Options: - --fork count of workers to spawn. uses "12" (available parallelism) workers when NODE_ENV is "production", otherwise "1" (the main) worker (default: 1 (env: FORK) - -c, --config-path path to the configuration file. defaults to the following files respectively in the current working directory: gateway.ts, gateway.mts, gateway.cts, gateway.js, gateway.mjs, gateway.cjs (env: CONFIG_PATH) - -h, --host host to use for serving (default: "0.0.0.0" (default: "0.0.0.0") - -p, --port port to use for serving (default: 4000 (env: PORT) - --polling schema polling interval in human readable duration (default: "10s") (env: POLLING) + --fork count of workers to spawn. uses "24" (available parallelism) workers when NODE_ENV is "production", + otherwise "1" (the main) worker (default: 1) (env: FORK) + -c, --config-path path to the configuration file. defaults to the following files respectively in the current working + directory: gateway.ts, gateway.mts, gateway.cts, gateway.js, gateway.mjs, gateway.cjs (env: + CONFIG_PATH) + -h, --host host to use for serving (default: 0.0.0.0) + -p, --port port to use for serving (default: 4000) (env: PORT) + --polling schema polling interval in human readable duration (default: 10s) (env: POLLING) --no-masked-errors don't mask unexpected errors in responses --masked-errors mask unexpected errors in responses (default: true) - --hive-registry-token Hive registry token for usage metrics reporting (env: HIVE_REGISTRY_TOKEN) - --hive-persisted-documents-endpoint [EXPERIMENTAL] Hive CDN endpoint for fetching the persisted documents. requires the "--hive-persisted-documents-token " option - --hive-persisted-documents-token [EXPERIMENTAL] Hive persisted documents CDN endpoint token. requires the "--hive-persisted-documents-endpoint " option + --hive-usage-target Hive registry target to which the usage data should be reported to. requires the + "--hive-usage-access-token " option (env: HIVE_USAGE_TARGET) + --hive-usage-access-token Hive registry access token for usage metrics reporting. requires the "--hive-usage-target " + option (env: HIVE_USAGE_ACCESS_TOKEN) + --hive-persisted-documents-endpoint [EXPERIMENTAL] Hive CDN endpoint for fetching the persisted documents. requires the + "--hive-persisted-documents-token " option + --hive-persisted-documents-token [EXPERIMENTAL] Hive persisted documents CDN endpoint token. requires the + "--hive-persisted-documents-endpoint " option --hive-cdn-endpoint Hive CDN endpoint for fetching the schema (env: HIVE_CDN_ENDPOINT) - --hive-cdn-key Hive CDN API key for fetching the schema. implies that the "schemaPathOrUrl" argument is a url (env: HIVE_CDN_KEY) + --hive-cdn-key Hive CDN API key for fetching the schema. implies that the "schemaPathOrUrl" argument is a url (env: + HIVE_CDN_KEY) --apollo-graph-ref Apollo graph ref of the managed federation graph (@) (env: APOLLO_GRAPH_REF) --apollo-key Apollo API key to use to authenticate with the managed federation up link (env: APOLLO_KEY) --disable-websockets Disable WebSockets support @@ -47,9 +56,12 @@ Options: --help display help for command Commands: - supergraph [options] [schemaPathOrUrl] serve a Federation supergraph provided by a compliant composition tool such as Mesh Compose or Apollo Rover - subgraph [schemaPathOrUrl] serve a Federation subgraph that can be used with any Federation compatible router like Apollo Router/Gateway - proxy [options] [endpoint] serve a proxy to a GraphQL API and add additional features such as monitoring/tracing, caching, rate limiting, security, and more + supergraph [options] [schemaPathOrUrl] serve a Federation supergraph provided by a compliant composition tool such as Mesh Compose or Apollo + Rover + subgraph [schemaPathOrUrl] serve a Federation subgraph that can be used with any Federation compatible router like Apollo + Router/Gateway + proxy [options] [endpoint] serve a proxy to a GraphQL API and add additional features such as monitoring/tracing, caching, rate + limiting, security, and more help [command] display help for command ``` diff --git a/packages/web/docs/src/content/gateway/usage-reporting.mdx b/packages/web/docs/src/content/gateway/usage-reporting.mdx index 33b053cbc..08276740d 100644 --- a/packages/web/docs/src/content/gateway/usage-reporting.mdx +++ b/packages/web/docs/src/content/gateway/usage-reporting.mdx @@ -29,8 +29,9 @@ Before proceeding, make sure you have ```sh filename="Run Hive Gateway with Usage Reporting enabled." {4} hive-gateway supergraph \ http://cdn.graphql-hive.com/artifacts/v1/12713322-4f6a-459b-9d7c-8aa3cf039c2e/supergraph \ - --hive-cdn-key "YOUR HIVE CDN KEY" \ - --hive-registry-token "YOUR HIVE REGISTRY TOKEN" + --hive-cdn-key "" \ + --hive-usage-target "" \ + --hive-usage-access-token "" ``` @@ -43,8 +44,9 @@ hive-gateway supergraph \ docker run --rm --name hive-gateway -p 4000:4000 \ ghcr.io/graphql-hive/gateway supergraph \ http://cdn.graphql-hive.com/artifacts/v1/12713322-4f6a-459b-9d7c-8aa3cf039c2e/supergraph \ - --hive-cdn-key "YOUR HIVE CDN KEY" \ - --hive-registry-token "YOUR HIVE REGISTRY TOKEN" + --hive-cdn-key "" \ + --hive-usage-target "" \ + --hive-usage-access-token "" ``` @@ -56,8 +58,9 @@ docker run --rm --name hive-gateway -p 4000:4000 \ ```sh filename="Run Hive Gateway with Usage Reporting enabled." {4} npx hive-gateway supergraph \ http://cdn.graphql-hive.com/artifacts/v1/12713322-4f6a-459b-9d7c-8aa3cf039c2e/supergraph \ - --hive-cdn-key "YOUR HIVE CDN KEY" \ - --hive-registry-token "YOUR HIVE REGISTRY TOKEN" + --hive-cdn-key "" \ + --hive-usage-target "" \ + --hive-usage-access-token "" ``` @@ -75,6 +78,8 @@ export const gatewayConfig = defineConfig({ type: 'hive', // The registry token provided by Hive Registry token: '' + // The registry target which the usage data should be reported to + target: '' /** * Other options * diff --git a/packages/web/docs/src/content/get-started/apollo-federation.mdx b/packages/web/docs/src/content/get-started/apollo-federation.mdx index 640eb9550..652941b53 100644 --- a/packages/web/docs/src/content/get-started/apollo-federation.mdx +++ b/packages/web/docs/src/content/get-started/apollo-federation.mdx @@ -609,7 +609,8 @@ guide, we can simply re-use the registry token we already use for the CLI. hive-gateway supergraph \ "" \ --hive-cdn-key "" \ - --hive-registry-token "" + --hive-usage-target "" \ + --hive-usage-access-token "" ``` | Parameter | Description | @@ -632,7 +633,8 @@ docker run --name hive-gateway -rm \ ghcr.io/graphql-hive/gateway supergraph \ "" \ --hive-cdn-key "" \ - --hive-registry-token "" + --hive-usage-target "" \ + --hive-usage-access-token "" ``` | Parameter | Description | @@ -651,14 +653,16 @@ docker run --name hive-gateway -rm \ npx hive-gateway supergraph \ "" \ --hive-cdn-key "" \ - --hive-registry-token "" + --hive-usage-target "" \ + --hive-usage-access-token "" ``` -| Parameter | Description | -| ----------------------- | ------------------------------------------- | -| `` | The endpoint of your Hive target | -| `` | The Hive CDN access key | -| `` | The Hive registry token for usage reporting | +| Parameter | Description | +| --------------------------- | ---------------------------------------------------------------------- | +| `` | The endpoint of your Hive target | +| `` | The Hive CDN access key | +| `` | The Hive registry target to which the usage data should be reported to | +| `` | The Hive registry token for usage reporting |