Tag: remote-server
-
Apollo Client: switch between local and remote server
0 Currently I’m creating an http link with a relative URI. This works when the server is running locally, and also works when the client and server are hosted remotely: const httpLink = createHttpLink({ uri: ‘/.netlify/functions/foo’, }); const authLink = setContext((_, { headers }) => { const token = process.env.REACT_APP_TOKEN return { headers: { …headers,…