Update - WunderGraph

Usage

npx wgc subgraph update <name> [-r, --routing-url <url>] [--label [labels...]] [--readme <path-to-readme>]

Update is an irreversible action. However, the change will only be visible to the routers once the composition has been successful. Until then, the routers will operate with the most recent valid composition. Please use subgraph check to understand the impact of your change.

Description

The npx wgc subgraph update command allows you to update an existing subgraph on the Cosmo platform’s control plane. With this command, you can modify the routing URL and apply or change labels associated with the subgraph. Use npx wgc subgraph update -h to see all the available options.

If the subgraph was created as an Event-Driven Graph (EDG), attempting to provide any one of the following parameters will produce an error: routing-url, susbcription-url, subscription-protocol, or websocket-subprotocol.

Parameters

Options

Examples

  1. Update the routing URL of the subgraph “products”:
npx wgc subgraph update products -r http://new-domain.com/graphql
  1. Update the labels for the subgraph “users”:
npx wgc subgraph update users --label team=B department=HR

Notes