Skip to content

Commit 6da9550

Browse files
committed
fixed README for typesSuffix
1 parent 0a7854f commit 6da9550

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,33 @@ import { IGeneratedInput } from './graphql'
107107
/* generates validation schema here */
108108
```
109109

110+
### `typesSuffix`
111+
112+
type: `string` default: (empty)
113+
114+
Suffixes all import types from generated typescript type.
115+
116+
```yml
117+
generates:
118+
path/to/graphql.ts:
119+
plugins:
120+
- typescript
121+
path/to/validation.ts:
122+
plugins:
123+
- typescript-validation-schema
124+
config:
125+
typesSuffix: I
126+
importFrom: ./graphql # path for generated ts code
127+
```
128+
129+
Then the generator generates code with import statement like below.
130+
131+
```ts
132+
import { GeneratedInputI } from './graphql'
133+
134+
/* generates validation schema here */
135+
```
136+
110137
### `enumsAsTypes`
111138

112139
type: `boolean` default: `false`

0 commit comments

Comments
 (0)