Skip to content

Commit 1a4f4d9

Browse files
Add guidence for using the data masking jscodeshift/codemod migration (#13037)
* Add guidence for using the data masking jscodeshift/codemod migration with graphql files * Tweak sentence --------- Co-authored-by: Jerel Miller <[email protected]>
1 parent 0a09828 commit 1a4f4d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/source/data/fragments.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,11 @@ This is rather tedious to do by hand for large applications. Apollo Client provi
14761476
without the development-only warnings.
14771477
</Note>
14781478
1479-
The codemod supports `.js`, `.jsx`, `.ts`, `.tsx`, `.graphql`, and `.gql` files. Use the `graphql` parser when running the codemod against GraphQL files.
1479+
The codemod supports `.js`, `.jsx`, `.ts`, `.tsx`, `.graphql`, and `.gql` files. For `.graphql` and `.gql` files, explicitly specify the file extensions.
1480+
1481+
```sh
1482+
npx jscodeshift -t ../path/to/apollo-client/scripts/codemods/data-masking/unmask.ts --extensions graphql ./src/**/*.graphql --mode migrate
1483+
```
14801484
14811485
By default, the codemod searches for `gql` and `graphql` tags in source files. If your application uses a custom name, use the `--tag` option to specify the name. Use `--tag` more than once to specify multiple names.
14821486

0 commit comments

Comments
 (0)