summaryrefslogtreecommitdiffstats
path: root/frontend/lib
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/lib')
-rw-r--r--frontend/lib/withData.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/lib/withData.js b/frontend/lib/withData.js
index e419078..3210cf6 100644
--- a/frontend/lib/withData.js
+++ b/frontend/lib/withData.js
@@ -4,7 +4,7 @@ import { LOCAL_STATE_QUERY } from '../queries/queries';
// can also be a function that accepts a `headers` object (SSR only) and returns a config
const client = new ApolloClient({
- uri: 'http://localhost:4444',
+ uri: process.env.NODE_ENV === 'development' ? 'http://localhost:4444' : 'http://localhost:4444',
ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once)
request: operation => {
// if we're in the client and the user has a token, send it along with the request
@@ -33,6 +33,7 @@ const client = new ApolloClient({
},
});
+// TODO don't export client for page.js
export { client };
export default withApollo({ client });