Skip to content

Commit a5a51fd

Browse files
committed
🐛 Fixed lacking flag
1 parent 2d95f34 commit a5a51fd

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/src/commands/schema/CLI.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import { Auth } from '@/Auth/index.js';
2-
import { projectOptions, confOptions } from '@/common/promptOptions.js';
2+
import { projectOptions, confOptions, ConfOptions } from '@/common/promptOptions.js';
33
import { Config, ConfigurationOptions } from '@/Configuration/index.js';
44
import { CommandModule } from 'yargs';
55
import { CommandSchemaPull } from './pull.js';
66
import { CommandSchemaPush } from './push.js';
77

8+
const schemaOptions: ConfOptions = {
9+
...projectOptions,
10+
schemaDir: {
11+
type: 'string',
12+
describe: 'location of the schema file'
13+
}
14+
}
15+
816
export default {
917
command: 'schema <command>',
1018
describe: 'Generate and modify your GraphQL schema',
@@ -14,7 +22,7 @@ export default {
1422
'pull',
1523
'Generate GraphQL schema from project at given path',
1624
async (yargs) => {
17-
yargs.options(confOptions({ ...projectOptions }));
25+
yargs.options(confOptions(schemaOptions));
1826
},
1927
async (argv) => {
2028
await Auth.login().then(Config.setTokenOptions);
@@ -30,7 +38,7 @@ export default {
3038
'push',
3139
'Deploy GraphQL schema as latest',
3240
async (yargs) => {
33-
yargs.options(confOptions({ ...projectOptions }));
41+
yargs.options(confOptions(schemaOptions));
3442
},
3543
async (argv) => {
3644
await Auth.login().then(Config.setTokenOptions);

0 commit comments

Comments
 (0)