Skip to content

Commit

Permalink
allow insecure https requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Sep 20, 2017
1 parent fc8677c commit 8b0bc1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/graphql-codegen-cli/src/cli.ts
Expand Up @@ -25,6 +25,8 @@ import {
} from 'graphql-codegen-generators';
import * as mkdirp from 'mkdirp';

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

export interface CLIOptions {
file?: string;
url?: string;
Expand Down
Expand Up @@ -2,7 +2,7 @@ import { debugLog, introspectionQuery, IntrospectionQuery } from 'graphql-codege
import * as request from 'request';

export const introspectionFromUrl = (url: string, headers: string[]): Promise<IntrospectionQuery> => {
console.log(`Loading GraphQL Introspection from remote: ${url}...`);
debugLog(`Loading GraphQL Introspection from remote: ${url}...`);

let splittedHeaders = (headers || []).map((header: string) => {
const result = header.match(/^(.*?)[:=]{1}(.*?)$/);
Expand Down

0 comments on commit 8b0bc1e

Please sign in to comment.