Link - WunderGraph

Usage

npx wgc subgraph link <source-subgraph-name> --target-subgraph <namespace>/<subgraph-name>

Description

The npx wgc subgraph link command allows you to link a source subgraph to a target subgraph on the control plane. When performing schema checks on the source subgraph, traffic and pruning checks will also be performed on the target subgraph. This is useful for verifying the impact of schema changes before they are propagated to the next environment. This feature enables cross-environment validation, allowing you to test how changes in one subgraph (typically in a development or staging environment) will affect another subgraph (typically in production or another environment).

Parameters

Options

Examples

  1. Link a subgraph named “products” in the default namespace to a target subgraph “users” in the “production” namespace:
npx wgc subgraph link products --target-subgraph production/users
  1. Link a subgraph named “inventory” in the “staging” namespace to a target subgraph “catalog” in the “production” namespace:
npx wgc subgraph link inventory -n staging --target-subgraph production/catalog
  1. Link subgraphs within the same namespace:
npx wgc subgraph link orders --target-subgraph default/shipping

Notes