The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(front): gate renewToken Apollo logger on IS_DEBUG_MODE (#19878)
Charles Bochet5c2a0cf11506
diff --git a/packages/twenty-front/src/modules/auth/services/AuthService.ts b/packages/twenty-front/src/modules/auth/services/AuthService.tsindex d8ec9f75569..ff42316a7f1 100644--- a/packages/twenty-front/src/modules/auth/services/AuthService.ts+++ b/packages/twenty-front/src/modules/auth/services/AuthService.ts@@ -14,6 +14,8 @@ import {} from '~/generated-metadata/graphql';import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+const isDebugMode = process.env.IS_DEBUG_MODE === 'true';+const logger = loggerLink(() => 'Twenty-Refresh');const renewTokenMutation = async (@@ -23,7 +25,7 @@ const renewTokenMutation = async (const httpLink = new HttpLink({ uri });const client = new ApolloClient({- link: ApolloLink.from([logger, httpLink]),+ link: ApolloLink.from([...(isDebugMode ? [logger] : []), httpLink]),cache: new InMemoryCache({}),});