Skip to content

Commit

Permalink
Fix incorrect CLI flags in subgraph prefixing (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-chambers authored Oct 8, 2024
1 parent 649f6e7 commit fd0030b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/federation/subgraph-prefixing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ By default, the `subgraph.yaml` file is generated without any prefixes. You can

This codemod will rename prefixes in already generated metadata. It can also be used to add or remove prefixes altogether.

The `fromGraphqlRootField` prefix will be stripped if provided, and the new prefix, `graphqlRootField`, will be added.
The `--from-graphql-root-field` prefix will be stripped if provided, and the new prefix, `--graphql-root-field`, will be added.
If the new prefix is already present, it will not be reapplied.

Examples:
```bash
# Add root field and type name prefixes to the subgraph set in the context
ddn codemod rename-graphql-prefixes --graphqlRootField 'app_' --graphqlTypeName 'App_'
ddn codemod rename-graphql-prefixes --graphql-root-field 'app_' --graphql-type-name 'App_'

# Change the root field prefix for the specified subgraph
ddn codemod rename-graphql-prefixes --subgraph app/subgraph.yaml --fromGraphqlRootField 'app_' --graphqlRootField 'new_'
```
ddn codemod rename-graphql-prefixes --subgraph app/subgraph.yaml --from-graphql-root-field 'app_' --graphql-root-field 'new_'
```

0 comments on commit fd0030b

Please sign in to comment.