Skip to content

Commit

Permalink
enable @urql/devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
iamstarkov committed Aug 5, 2019
1 parent bce37a1 commit 9f20f06
Show file tree
Hide file tree
Showing 3 changed files with 495 additions and 18 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"private": true,
"dependencies": {
"@urql/devtools": "^0.0.2",
"@urql/exchange-suspense": "^0.1.0",
"dotenv": "8.0.0",
"graphql": "14.4.2",
Expand Down
4 changes: 3 additions & 1 deletion util/urql/init-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
ssrExchange
} from "urql";
import { suspenseExchange } from "@urql/exchange-suspense";
import { devtoolsExchange } from "@urql/devtools";
import "isomorphic-unfetch";

let urqlClient = null;
Expand All @@ -26,12 +27,13 @@ export default function initUrqlClient(initialState, token) {
// Active suspense mode on the server-side
suspense: true,
exchanges: [
!isServer && devtoolsExchange,
dedupExchange,
suspenseExchange,
cacheExchange,
ssrCache,
fetchExchange
],
].filter(Boolean),
fetchOptions: { headers }
});
}
Expand Down
Loading

0 comments on commit 9f20f06

Please sign in to comment.