Attempt at #12289 (edit Félix: removed fix keyword since I don't think it fixes it) --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
16 lines
353 B
TypeScript
16 lines
353 B
TypeScript
import { loadDevMessages, loadErrorMessages } from '@apollo/client/dev';
|
|
import { useEffect } from 'react';
|
|
|
|
export const ApolloDevLogEffect = () => {
|
|
const isDebugMode = process.env.IS_DEBUG_MODE === 'true';
|
|
|
|
useEffect(() => {
|
|
if (isDebugMode) {
|
|
loadDevMessages();
|
|
loadErrorMessages();
|
|
}
|
|
}, [isDebugMode]);
|
|
|
|
return null;
|
|
};
|