Updates a federated graph on the control plane.
npx wgc federated-graph update
command allows you to update an existing federated graph on the Cosmo platform’s control plane. With this command, you can modify the routing URL of your router and update the labels used to select the subgraphs to be federated.
<name>
: The name of the federated graph you want to update. Replace <name>
with the name of the federated graph you wish to modify.-n, --namespace
: The namespace of the federated graph (Default: “default”).
-r , --routing-url
: The updated routing URL of your router. This URL defines the endpoint where the router will be accessible. The federated graph will be accessible through this updated router URL.
--label-matcher <labels...>
: The updated labels used to select the subgraphs to be federated. Labels are passed in the format <key>=<value> <key>=<value>
, where each <key>=<value>
pair represents a label key and its corresponding value. The federated graph will include the subgraphs that match the updated labels.
--unset-label-matcher
: This will remove all label matchers. It will not add new label matchers if both this and —label-matchers option is passed.
--admission-webhook-url <url>
the base url of the admission webhook. This is the url that the controlplane will use to implement admission control for the federated graph. Example: https://admission.example.com
(without the /validate-config
path name)
--admission-webhook-secret
: Allows you to sign requests (HMAC) made to your admission webhook url. The header containing this signature is X-Cosmo-Signature-256
--readme <path-to-readme>
: The path to the markdown file which describes the federated graph. The readme can be used to communicate the information of the federated graph to other team members.
--suppress-warnings
: This flag suppresses any warnings produced by composition.
npx wgc federated-graph update
command interacts with the Cosmo platform’s control plane to update the specified federated graph. Ensure that you have the necessary permissions to perform this operation.