Skip to content

Commit 782db7e

Browse files
authored
feat(docs): add --label option to subgraph check command documentation (#74)
* feat(docs): add --label option to subgraph check command documentation * fix(docs): clarify --label option in subgraph check command documentation
1 parent bd0346e commit 782db7e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/cli/subgraph/check.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ The `npx wgc subgraph check` command checks for breaking changes and composition
5555

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

58+
* `--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.
59+
5860
<Info>
5961
The check command requires either the `--schema` or `--delete` parameter.
6062
</Info>
@@ -67,6 +69,16 @@ The `npx wgc subgraph check` command checks for breaking changes and composition
6769
npx wgc subgraph check products -n default --schema ./schemas/new_schema.graphql
6870
```
6971

72+
2. Check for breaking changes and composition errors for the subgraph which does not exist yet:
73+
74+
```bash
75+
npx wgc subgraph check newSubgraph -n default --schema ./schemas/new_schema.graphql --label team=A
76+
```
77+
78+
<Info>
79+
The labels should match the labels of the federated graph you want to check against.
80+
</Info>
81+
7082
## Sample output with changes and errors
7183

7284
Changes

0 commit comments

Comments
 (0)