Fetch Schema - WunderGraph

Usage

npx wgc monograph fetch-schema <name>

Description

The npx wgc monograph fetch-schema command allows you to fetch the latest valid Schema Definition Language (SDL) of a monograph from the Cosmo platform’s control plane. You can use this command to retrieve the SDL and, if needed, pipe the output to a file.

By default, the output schema is set to the Router Schema. To use the Client Schema instead, specify the -c or --client-schema flag to the command.

Parameters

Options

Examples

npx wgc monograph fetch-schema production

Fetch the latest valid SDL of the monograph named “production.”

npx wgc monograph fetch-schema production -o production-schema.graphql

Fetch the latest valid SDL of the monograph named “production” and save it to a file named “production-schema.graphql.”

npx wgc monograph fetch-schema production --client-schema

Fetch the latest valid client SDL of the monograph named “production.”

Notes