> ## Documentation Index
> Fetch the complete documentation index at: https://wundergraphinc-brendan-add-sof-link.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch

> Fetches the latest valid router execution config of a federated graph.

## Usage

```bash theme={null}
npx wgc router fetch production -o router.json
```

## Description

The `npx wgc router fetch` command allows you to fetch the latest valid router execution config of a federated graph from the Cosmo platform's control plane. The config can be piped into a file, which the router can read with the `EXECUTION_CONFIG_FILE_PATH` environment variable or via yaml config

```bash theme={null}
execution_config:
  file:
    # Path to the previous generated file
    path: "router.json"
```

## Parameters

* `<name>`: The name of the federated graph for which you want to retrieve the router config.

## Options

* `-n, --namespace` : The namespace of the federated graph (Default: "default").

* `-o, --out` : Destination file for the router config. Prints to standard output if not provided.

## Examples

Fetch the latest router execution config of the federated graph named "production."

```bash theme={null}
npx wgc router fetch production -o router.json
```

Fetch the latest router config of the federated graph named `production` and save it to a file named `router.json`
