Create

Creates a token scoped to a federated graph. The token permits the router to communicate with the platform and to export metrics to the collectors.

Usage

npx wgc router token create <name> -g <graphName>

Description

The npx wgc router token create command creates a new token for a federated graph. The token can be used to authenticate against the control plane from the routers.

Parameters

  • <name>: The name of the token to create. Only serves as a reference for the user.

Required Options

-g <graphName>, --graph-name <graphName>

The name of the federated graph that the token should be created for.

Options

-n, --namespace : The namespace of the federated graph (Default: "default").

Examples

npx wgc router token create graphToken -g production

Create a new token named "graphToken" for the federated graph named "production". The token is displayed once in the CLI. Pass the token as an environment variable to the router configuration.

Notes

  • The token is only valid for a specific federated graph.

Last updated