Compose
Compose generates the router execution config locally from your subgraphs. The config can be used to start your router with a pre-built router config.
IMPORTANT: Please note that since this command runs locally, the subgraphs may or may not exist on the control plane. It is recommended to not use this for production, if you plan to use the Cosmo platform as schema registry or analytics platform. For production, you can fetch the latest router execution config for your federated graph using the fetch command instead.
Usage
Description
The npx wgc router compose
command allows you to compose subgraphs and build a router execution config locally without a connection to the control plane.
Options
-i, --input
: The path to the input config file that contains information about your subgraphs.-o, --out
: Destination file for the router config. Prints to standard output if not provided.
Input file structure
Examples
Compose subgraphs mentioned in the input file graph.yaml
Compose subgraphs mentioned in graph.yaml and write it to router.json
Notes
The
npx wgc router compose
command does not interact with the control plane and completely runs locally.
Last updated