Skip to content

Commit b927527

Browse files
committed
fixed README for scalarSchemas option
1 parent 0b6eaa8 commit b927527

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,32 @@ type: `boolean` default: `false`
9191

9292
Generates validation string schema as do not allow empty characters by default.
9393

94+
### `scalarSchemas`
95+
96+
type: `ScalarSchemas`
97+
98+
Extends or overrides validation schema for the built-in scalars and custom GraphQL scalars.
99+
100+
#### yup schema
101+
102+
```yml
103+
config:
104+
schema: yup
105+
scalarSchemas:
106+
Date: yup.date()
107+
Email: yup.string().email()
108+
```
109+
110+
#### zod schema
111+
112+
```yml
113+
config:
114+
schema: zod
115+
scalarSchemas:
116+
Date: z.date()
117+
Email: z.string().email()
118+
```
119+
94120
### `directives`
95121

96122
type: `DirectiveConfig`

0 commit comments

Comments
 (0)