Skip to content

Commit 8b644ce

Browse files
authored
Merge pull request #41 from mizdra/improve-documentation
Improve documentation
2 parents ae942c0 + 99a48a5 commit 8b644ce

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ GraphQL Code Generator Plugin to define mock data factory.
88
npm install --save-dev @mizdra/graphql-fabbrica
99
```
1010

11+
## Requirements
12+
13+
- `graphql` >= 16.0.0
14+
- `typescript` >= 5.0.0
15+
- `--moduleResolution Bundler`, `--moduleResolution Node16` or `--moduleResolution NodeNext` is required
16+
1117
## Usage
1218

1319
First, you should configure the configuration file of GraphQL Code Generator as follows.
@@ -367,6 +373,24 @@ type: `boolean`, default: `false`
367373

368374
Does not add `__typename` to the generated mock data. The value of this option must be the same as the option of the same name in [typescript plugin](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript).
369375

376+
### `namingConvention`
377+
378+
type: `NamingConvention`, default: `change-case-all#pascalCase`
379+
380+
Allow you to override the naming convention of the output. The value of this option must be the same as the option of the same name in [graphql code generator](https://the-guild.dev/graphql/codegen/docs/config-reference/naming-convention#namingconvention).
381+
382+
### `typesPrefix`
383+
384+
type: `string`, default: `''`
385+
386+
Prefixes all the generated types. This value must be the same as the option of the same name in [typescript plugin](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#typesprefix).
387+
388+
### `typesSuffix`
389+
390+
type: `string`, default: `''`
391+
392+
Suffixes all the generated types. This value must be the same as the option of the same name in [typescript plugin](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#typessuffix).
393+
370394
## Troubleshooting
371395

372396
### `error TS7022: '<Type>Factory' implicitly has type 'any' because ...`

0 commit comments

Comments
 (0)