Skip to content

Commit

Permalink
Merge pull request #612 from w3bdesign/dev
Browse files Browse the repository at this point in the history
Remove node-fetch
  • Loading branch information
w3bdesign authored Oct 6, 2021
2 parents d14f848 + d5ae165 commit 442bfb7
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 191 deletions.
234 changes: 47 additions & 187 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextjs-woocommerce",
"version": "1.0.18",
"version": "1.0.19",
"description": "NextJS WooCommerce webshop",
"main": "index.js",
"scripts": {
Expand All @@ -18,7 +18,6 @@
"autoprefixer": "^10.3.7",
"graphql": "^15.6.1",
"next": "^11.1.3-canary.45",
"node-fetch": "^2.6.1",
"nprogress": "^0.2.0",
"postcss": "^8.3.9",
"react": "^17.0.2",
Expand Down
5 changes: 3 additions & 2 deletions utils/apollo/ApolloClient.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*eslint complexity: ["error", 6]*/

import fetch from 'node-fetch';
const fetcher = (url) => fetch(url).then((res) => res.json());

import {
ApolloClient,
InMemoryCache,
Expand Down Expand Up @@ -81,7 +82,7 @@ const client = new ApolloClient({
afterware.concat(
createHttpLink({
uri: WOO_CONFIG.GRAPHQL_URL,
fetch,
fetcher,
})
)
),
Expand Down

0 comments on commit 442bfb7

Please sign in to comment.