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: eslint.config.js
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ export default tsEslint.config({
9
9
'vitest*.config.ts',
10
10
'**/generated/**/*',
11
11
'tests/_/schemas/*/graffle/**/*',
12
+
'**/tests/fixture/graffle/**/*',
13
+
'src/layers/1_Schema/Hybrid/types/Scalar/Scalar.ts',// There is an ESLint error that goes away when ignored leading to a circular issue of either lint error or unused lint disable.
constargs=Command.create().description(`Generate a type safe GraphQL client.`)
9
11
.parameter(
@@ -14,25 +16,15 @@ const args = Command.create().description(`Generate a type safe GraphQL client.`
14
16
)
15
17
.parameter(
16
18
`schema`,
17
-
z.string().min(1).describe(
18
-
`Path to where your GraphQL schema is. If a URL is given it will be introspected. Otherwise assumed to be a path to your GraphQL SDL file. If a directory path is given, then will look for a "schema.graphql" within that directory. Otherwise will attempt to load the exact file path given.`,
19
+
z.string().min(1).optional().describe(
20
+
`Path to where your GraphQL schema is. If a URL is given it will be introspected. Otherwise assumed to be a path to your GraphQL SDL file. If a directory path is given, then will look for a "schema.graphql" within that directory. Otherwise will attempt to load the exact file path given. If omitted, then your project must have a configuration file which supplies the schema source.`,
19
21
),
20
22
)
21
-
.parametersExclusive(
22
-
`schemaErrorType`,
23
-
$=>
24
-
$.parameter(
25
-
`schemaErrorTypes`,
26
-
z.boolean().describe(
27
-
`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".`,
28
-
),
29
-
)
30
-
.parameter(
31
-
`schemaErrorTypePattern`,
32
-
z.string().min(1).describe(
33
-
`Designate objects whose name matches this JS regular expression as being error types in your schema.`,
34
-
),
35
-
).default(`schemaErrorTypes`,true),
23
+
.parameter(
24
+
`project`,
25
+
z.string().optional().describe(
26
+
`Path to your configuration file. By default will look for "graffle.config.{ts,js,mjs,mts}" in the current working directory. If a directory path is given, then will look for "graffle.config.{ts,js,mjs,mts}" in that directory.`,
27
+
),
36
28
)
37
29
.parameter(
38
30
`defaultSchemaUrl`,
@@ -43,44 +35,20 @@ const args = Command.create().description(`Generate a type safe GraphQL client.`
43
35
z.string().min(1).describe(
44
36
`A GraphQL endpoint to be used as the default URL in the generated client for requests.`,
45
37
),
46
-
]).default(true),
38
+
]).optional(),
47
39
)
48
40
.parameter(
49
41
`output`,
50
-
z.string().min(1).default(`./graffle`).describe(
51
-
`Directory path for where to output the generated TypeScript files.`,
42
+
z.string().min(1).optional().describe(
43
+
`Directory path for where to output the generated TypeScript files. By default will be './graffle' in the project root.`,
52
44
),
53
45
)
54
46
.parameter(
55
47
`format`,
56
48
z.boolean().describe(
57
49
`Try to format the generated files. At attempt to use dprint will be made. You need to have these dependencies installed in your project: @dprint/formatter, @dprint/typescript.`,
58
50
)
59
-
.default(true),
60
-
)
61
-
.parameter(
62
-
`libraryPathClient`,
63
-
z.string().optional().describe(
64
-
`Custom location for where the generated code should import the Graffle "client" module from.`,
65
-
),
66
-
)
67
-
.parameter(
68
-
`libraryPathSchema`,
69
-
z.string().optional().describe(
70
-
`Custom location for where the generated code should import the Graffle "schema" module from.`,
71
-
),
72
-
)
73
-
.parameter(
74
-
`libraryPathScalars`,
75
-
z.string().optional().describe(
76
-
`Custom location for where the generated code should import the Graffle "scalars" module from.`,
77
-
),
78
-
)
79
-
.parameter(
80
-
`libraryPathUtilitiesForGenerated`,
81
-
z.string().optional().describe(
82
-
`Custom location for where the generated code should import the Graffle "utilities-for-generated" module from.`,
83
-
),
51
+
.optional(),
84
52
)
85
53
.settings({
86
54
parameters: {
@@ -89,33 +57,51 @@ const args = Command.create().description(`Generate a type safe GraphQL client.`
0 commit comments