The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
feature: fix Apollo client
Sammy Teillet7f2ec0c260d6
diff --git a/front/.env.example b/front/.env.exampleindex b4ab8427812..deb105c8c6f 100644--- a/front/.env.example+++ b/front/.env.example@@ -1 +1 @@-REACT_APP_API_URL=http://localhost:3000\ No newline at end of file+REACT_APP_API_URL=http://localhost:8080\ No newline at end of filediff --git a/front/src/index.tsx b/front/src/index.tsxindex 3c13d9d963c..2a3c1c11ae7 100644--- a/front/src/index.tsx+++ b/front/src/index.tsx@@ -13,11 +13,13 @@ import { setContext } from '@apollo/client/link/context';import '@emotion/react';import { ThemeType } from './layout/styles/themes';-const httpLink = createHttpLink({ uri: process.env.REACT_APP_API_URL });+const httpLink = createHttpLink({+ uri: `${process.env.REACT_APP_API_URL}/v1/graphql`,+});const authLink = setContext((_, { headers }) => {return {- headers: headers,+ headers: { ...headers, 'x-hasura-admin-secret': 'secret' },};});