Skip to content

feat(docs): add --label option to subgraph check command documentation #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/cli/subgraph/check.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The `npx wgc subgraph check` command checks for breaking changes and composition

* `--suppress-warnings`: This flag suppresses any warnings produced by composition.

* `--label [labels...]`: The labels to apply to the new subgraph. The labels are passed in the format <key>=<value> <key>=<value>. This parameter is always ignored if the subgraph already exists.

<Info>
The check command requires either the `--schema` or `--delete` parameter.
</Info>
Expand All @@ -67,6 +69,16 @@ The `npx wgc subgraph check` command checks for breaking changes and composition
npx wgc subgraph check products -n default --schema ./schemas/new_schema.graphql
```

2. Check for breaking changes and composition errors for the subgraph which does not exist yet:

```bash
npx wgc subgraph check newSubgraph -n default --schema ./schemas/new_schema.graphql --label team=A
```

<Info>
The labels should match the labels of the federated graph you want to check against.
</Info>

## Sample output with changes and errors

Changes
Expand Down