Skip to content

Commit

Permalink
Merge pull request #613 from w3bdesign/dev
Browse files Browse the repository at this point in the history
Reimplement node-fetch
  • Loading branch information
w3bdesign authored Oct 6, 2021
2 parents 442bfb7 + 1970f08 commit 83f7ec9
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 4 deletions.
68 changes: 68 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
"start": "next start",
"lint": "next lint"
},
"keywords": [],
"author": "",
Expand All @@ -18,6 +19,7 @@
"autoprefixer": "^10.3.7",
"graphql": "^15.6.1",
"next": "^11.1.3-canary.45",
"node-fetch": "2.6.5",
"nprogress": "^0.2.0",
"postcss": "^8.3.9",
"react": "^17.0.2",
Expand Down
5 changes: 2 additions & 3 deletions utils/apollo/ApolloClient.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*eslint complexity: ["error", 6]*/

const fetcher = (url) => fetch(url).then((res) => res.json());

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

1 comment on commit 83f7ec9

@vercel
Copy link

@vercel vercel bot commented on 83f7ec9 Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.