File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,21 @@ import { z } from 'zod'
6
6
import { generateCode } from '../generator/generator.js'
7
7
8
8
const args = Command . create ( ) . description ( `Generate a type safe GraphQL client.` )
9
- . parameter ( `schemaPath ` , z . string ( ) . min ( 1 ) . describe ( `File path to where your GraphQL schema is.` ) )
9
+ . parameter ( `schema ` , z . string ( ) . min ( 1 ) . describe ( `File path to where your GraphQL schema is.` ) )
10
10
. parameter (
11
11
`output` ,
12
12
z . string ( ) . min ( 1 ) . optional ( ) . describe (
13
13
`File path for where to output the generated TypeScript types. If not given, outputs to stdout.` ,
14
14
) ,
15
15
)
16
+ . settings ( {
17
+ parameters : {
18
+ environment : false ,
19
+ } ,
20
+ } )
16
21
. parse ( )
17
22
18
- const schemaSource = await fs . readFile ( args . schemaPath , `utf8` )
23
+ const schemaSource = await fs . readFile ( args . schema , `utf8` )
19
24
const code = generateCode ( { schemaSource } )
20
25
21
26
if ( args . output ) {
You can’t perform that action at this time.
0 commit comments