Skip to content

Commit

Permalink
Add -H/--headers meta to yargs settings
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Mar 21, 2017
1 parent 4b112a3 commit 66040c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ const argv = require('yargs')
.describe('e', 'URL to existing GraphQL server to extend')
.alias('o', 'open')
.describe('o', 'Open page with IDL editor and GraphiQL in browser')
.alias('H', 'header')
.describe('H', 'Specify headers to the proxied server in curl format')
.nargs('H', 1)
.implies('header', 'extend')
.help('h')
.alias('h', 'help')
.argv

const log = console.log;

// log(argv.header) // <- array here

let fileArg = argv._[0];
let fileName = fileArg || (argv.extend ?
'./schema_extension.faker.graphql' :
Expand Down

0 comments on commit 66040c6

Please sign in to comment.