description |
---|
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. |
npx wgc router token create <name> -g <graphName>
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.
<name>
: The name of the token to create. Only serves as a reference for the user.
-g <graphName>, --graph-name <graphName>
The name of the federated graph that the token should be created for.
-n, --namespace
: The namespace of the federated graph (Default: "default").
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.
- The token is only valid for a specific federated graph.