Skip to content

Commit

Permalink
Assume the output is a directory when it has no extension (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadaj authored Jul 9, 2018
1 parent 4f31fd8 commit b4a6fb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/apollo-cli/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default function generate(

validateQueryDocument(schema, document);

if (outputPath.split('.').length <= 1 && !fs.existsSync(outputPath)) {
fs.mkdirSync(outputPath);
}

if (target === "swift") {
options.addTypename = true;
const context = compileToIR(schema, document, options);
Expand Down

0 comments on commit b4a6fb1

Please sign in to comment.