From 1b4451fc729ea8887b35c2de200f2cc27f5f6c1a Mon Sep 17 00:00:00 2001 From: vogric Date: Wed, 13 Jan 2021 00:27:21 -0300 Subject: [PATCH] URI environment variable --- app/lib/apolloClient.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/lib/apolloClient.js b/app/lib/apolloClient.js index 3cbfed6..30021ea 100644 --- a/app/lib/apolloClient.js +++ b/app/lib/apolloClient.js @@ -1,12 +1,12 @@ import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; -import fetch from 'node-fetch'; +import fetch from "node-fetch"; const client = new ApolloClient({ - cache: new InMemoryCache(), - link: new HttpLink({ - uri: 'http://localhost:3000/admin/api', - fetch - }) + cache: new InMemoryCache(), + link: new HttpLink({ + uri: process.env.NEXT_PUBLIC_URI, + fetch, + }), }); -export default client; \ No newline at end of file +export default client;