Fetches the latest valid SDL of a federated graph and all its subgraphs and the latest valid router config of a federated graph.
npx wgc federated-graph fetch
command allows you to download the latest valid Schema Definition Language (SDL) of a federated graph and all its subgraphs and the latest valid router config of a federated graph from the Cosmo platform’s control plane. The fetched SDL represents the unified schema of the federated graph. You can use this command to retrieve the SDL.
<name>
: The name of the federated graph you want to fetch. Replace <name>
with the name of the federated graph you wish to retrieve the SDL for.-n, --namespace
: The namespace of the federated graph (Default: “default”).
-o, --out
: Destination folder for the SDL of the federated graph and its subgraphs.
-a, --apollo-compatibility
: Enable Apollo compatibility to generate the composition configs and script to generate schema using rover.
-v, --federation-version
: The version of federation to be used by rover in the format “1”, “2”, or “2.x.y”. Default is 2.5.0.
Apollo Compatibility mode
-v
option, pass the version of the federation used by the rover, if not provided it falls back to “2.5.0”.