Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
ignoreNoDocuments
flag and config option (#8040)
* feat: add new ignoreNoDocuments config and cli flag * docs: add ignoreNoDocuments flag
- Loading branch information
Showing
6 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
'@graphql-codegen/plugin-helpers': minor | ||
'@graphql-codegen/cli': minor | ||
--- | ||
|
||
Add new config option to not exit with non-zero exit code when there are no documents. | ||
|
||
You can use this option in your config: | ||
```yaml | ||
schema: 'schema.graphql' | ||
documents: | ||
- 'src/**/*.graphql' | ||
ignoreNoDocuments: true | ||
``` | ||
|
||
Alternative you can use the CLI to set this option: | ||
```bash | ||
$ codegen --config-file=config.yml --ignore-no-documents | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8e44df5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
graphql-code-generator – ./
graphql-code-generator.vercel.app
graphql-code-generator-git-master-theguild.vercel.app
www.graphql-code-generator.com
graphql-code-generator-theguild.vercel.app
graphql-codegen.com
www.graphql-codegen.com
graphql-code-generator.com