How to create a feature flag.
Package | Minimum version |
---|---|
wgc | 0.58.0 |
router | 0.95.0 |
--enabled
flag. To enable after creation, see wgc ff enable
.feature-flag
is ff
.
Note that unless specified by the --namespace
parameter, the namespace will be automatically passed as “default”.
<name>
: The name of the Feature Flag to create. Must be unique among all feature flags in the specified (otherwise “default”) namespace.--fs, --feature-subgraphs:
A list of names of the feature subgraphs that compose the feature flag. At least one feature subgraph name must be included, and multiple names are space delimited. Including a non-feature subgraph or a feature subgraph that does not exist in the specified (otherwise “default”) namespace will produce an error.
-n, --namespace
: The namespace of the feature flag (defaults to “default”). Returns an error if the feature flag does not exist in that namespace.
-e --enabled
: Activates the feature flag immediately upon creation. A new feature flag is disabled by default to prevent accidental compositions.
--label [labels...]:
The labels to apply to the feature flag. The labels are passed in the format key=value
, and multiple values are space delimited.
-j, --json
: Outputs the information in JSON format.
team=A
and team=B
: