Skip to content

Commit 8003efd

Browse files
committed
Fix schema filename
1 parent 686f99b commit 8003efd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/apollo/src/commands/client/download-schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export default class SchemaDownload extends ClientCommand {
1919
static args = [
2020
{
2121
name: "output",
22-
description: "Path to write the introspection result to",
23-
required: true,
24-
default: "schema.json"
22+
description: "Path to write the introspection result to"
2523
}
2624
];
2725

@@ -30,7 +28,9 @@ export default class SchemaDownload extends ClientCommand {
3028
let gitContext;
3129
await this.runTasks(({ args, project, flags }) => {
3230
const isSDLFormat = flags.target && flags.target.toUpperCase() === "SDL";
33-
const output = isSDLFormat ? "schema.graphql" : args.output;
31+
console.log(args);
32+
const output =
33+
args.output || (isSDLFormat ? "schema.graphql" : "schema.json");
3434
return [
3535
{
3636
title: `Saving schema to ${output}`,

0 commit comments

Comments
 (0)