Skip to content

Commit

Permalink
Merge branch 'develop' into revanth/swTests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpatil-magento authored Nov 13, 2019
2 parents 6910521 + 23cd068 commit 85ee41d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/pwa-buildpack/lib/Utilities/graphQL.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const fetch = require('node-fetch');
const graphQLQueries = require('../queries');
const { Agent: HTTPSAgent } = require('https');

// To be used with `node-fetch` in order to allow self-signed certificates.
const fetchAgent = new HTTPSAgent({ rejectUnauthorized: false });

const fetchQuery = query => {
return fetch(
Expand All @@ -10,7 +14,8 @@ const fetchQuery = query => {
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip'
},
body: JSON.stringify({ query })
body: JSON.stringify({ query }),
agent: fetchAgent
}
)
.then(result => result.json())
Expand Down

0 comments on commit 85ee41d

Please sign in to comment.