From cab6919072fd8145da7c703134c88cfd48ddd27b Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Mon, 2 Apr 2018 16:49:41 -0400 Subject: temporary fix for broken apollo cache policy --- frontend/lib/withData.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'frontend/lib') diff --git a/frontend/lib/withData.js b/frontend/lib/withData.js index 5a32fe3..1a152a3 100644 --- a/frontend/lib/withData.js +++ b/frontend/lib/withData.js @@ -7,11 +7,10 @@ export default withApollo({ client: new ApolloClient({ uri: 'http://localhost:4444', // cache: new InMemoryCache().restore(initialState || {}), - // ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once) + ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once) request: operation => { - console.log('hey'); + console.log(operation); if (typeof localStorage !== 'undefined' && localStorage.getItem('token')) { - console.log('heyyy'); console.log(`Bearer ${localStorage.getItem('token')}`); operation.setContext({ headers: { -- cgit v1.3