You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cli/generate.ts
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,22 @@ const args = Command.create().description(`Generate a type safe GraphQL client.`
12
12
`Directory path for where to output the generated TypeScript files.`,
13
13
),
14
14
)
15
+
.parametersExclusive(
16
+
`schemaErrorType`,
17
+
$=>
18
+
$.parameter(
19
+
`schemaErrorTypes`,
20
+
z.boolean().describe(
21
+
`Use the schema error types pattern. All object types whose name starts with "Error" will be considered to be error types. If you want to specify a custom name pattern then use the other parameter "schemaErrorTypePattern".`,
22
+
),
23
+
)
24
+
.parameter(
25
+
`schemaErrorTypePattern`,
26
+
z.string().min(1).describe(
27
+
`Designate objects whose name matches this JS regular expression as being error types in your schema.`,
28
+
),
29
+
).default(`schemaErrorTypes`,true),
30
+
)
15
31
.parameter(`format`,z.boolean().describe(`Format the generated files using dprint.`).default(true))
0 commit comments