diff --git a/packages/twenty-front/src/modules/auth/services/AuthService.ts b/packages/twenty-front/src/modules/auth/services/AuthService.ts index d8ec9f7556..ff42316a7f 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({}), });