Usage
A plugin subgraph name must be unique within a namespace.
After creating a plugin subgraph, you can publish it with wgc router plugin
publish.
Description
Thenpx wgc router plugin create
command allows you to create a new plugin subgraph within the Cosmo platform. Plugin subgraphs are specialized GraphQL schemas that extend the functionality of your federated graph through plugins. The [pluginName]
argument specifies the name of the new plugin subgraph. Use npx wgc router plugin create -h
to see all the available options.
Parameters
[pluginName]
: The name of the plugin subgraph you want to create. It should be a unique identifier (within the namespace) and is used to uniquely identify your plugin subgraph.
Options
-
-n, --namespace
: The namespace of the plugin subgraph (Default: “default”). -
--label
: Assign multiple labels to the new plugin subgraph. Labels are used to categorize and organize subgraphs based on specific criteria (e.g., team, department, project).- Example:
--label team=A
- Example:
-
--readme <path-to-readme>:
The path to the markdown file which describes the plugin subgraph.
Examples
- Create a new plugin subgraph named “projects” with the label “team=A”:
- Create a new plugin subgraph with a readme file:
- Create a plugin subgraph in a specific namespace: