Add: Flag to enable apollo devtools in production (#21094)
* Add: Flag to enable apollo devtools in production * Fix: missing field
This commit is contained in:
parent
5f2b1b574d
commit
838565d52d
@ -98,6 +98,7 @@ export interface App {
|
|||||||
fallbackOnEmptyLocaleString: boolean
|
fallbackOnEmptyLocaleString: boolean
|
||||||
disableWebsocketFallback: boolean
|
disableWebsocketFallback: boolean
|
||||||
maxMutationPayloadSize: number
|
maxMutationPayloadSize: number
|
||||||
|
enableApolloDevTools: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BbbTabletApp {
|
export interface BbbTabletApp {
|
||||||
|
@ -11,6 +11,7 @@ import apolloContextHolder from '../../core/graphql/apolloContextHolder/apolloCo
|
|||||||
import connectionStatus from '../../core/graphql/singletons/connectionStatus';
|
import connectionStatus from '../../core/graphql/singletons/connectionStatus';
|
||||||
import deviceInfo from '/imports/utils/deviceInfo';
|
import deviceInfo from '/imports/utils/deviceInfo';
|
||||||
import BBBWeb from '/imports/api/bbb-web-api';
|
import BBBWeb from '/imports/api/bbb-web-api';
|
||||||
|
import useMeetingSettings from '/imports/ui/core/local-states/useMeetingSettings';
|
||||||
|
|
||||||
interface ConnectionManagerProps {
|
interface ConnectionManagerProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@ -65,6 +66,9 @@ const ConnectionManager: React.FC<ConnectionManagerProps> = ({ children }): Reac
|
|||||||
const tsLastPingMessageRef = useRef<number>(0);
|
const tsLastPingMessageRef = useRef<number>(0);
|
||||||
const boundary = useRef(15_000);
|
const boundary = useRef(15_000);
|
||||||
const [terminalError, setTerminalError] = React.useState<string>('');
|
const [terminalError, setTerminalError] = React.useState<string>('');
|
||||||
|
const [MeetingSettings] = useMeetingSettings();
|
||||||
|
const enableDevTools = MeetingSettings.public.app.enableApolloDevTools;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
BBBWeb.index().then(({ data }) => {
|
BBBWeb.index().then(({ data }) => {
|
||||||
setGraphqlUrl(data.graphqlWebsocketUrl);
|
setGraphqlUrl(data.graphqlWebsocketUrl);
|
||||||
@ -206,7 +210,7 @@ const ConnectionManager: React.FC<ConnectionManagerProps> = ({ children }): Reac
|
|||||||
client = new ApolloClient({
|
client = new ApolloClient({
|
||||||
link: wsLink,
|
link: wsLink,
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
connectToDevTools: process.env.NODE_ENV === 'development',
|
connectToDevTools: (process.env.NODE_ENV === 'development') || enableDevTools,
|
||||||
});
|
});
|
||||||
setApolloClient(client);
|
setApolloClient(client);
|
||||||
apolloContextHolder.setClient(client);
|
apolloContextHolder.setClient(client);
|
||||||
|
@ -20,6 +20,7 @@ export const meetingClientSettingsInitialValues: MeetingClientSettings = {
|
|||||||
html5ClientBuild: 'HTML5_CLIENT_VERSION',
|
html5ClientBuild: 'HTML5_CLIENT_VERSION',
|
||||||
helpLink: 'https://bigbluebutton.org/html5/',
|
helpLink: 'https://bigbluebutton.org/html5/',
|
||||||
delayForUnmountOfSharedNote: 120000,
|
delayForUnmountOfSharedNote: 120000,
|
||||||
|
enableApolloDevTools: false,
|
||||||
bbbTabletApp: {
|
bbbTabletApp: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
iosAppStoreUrl: 'https://apps.apple.com/us/app/bigbluebutton-tablet/id1641156756',
|
iosAppStoreUrl: 'https://apps.apple.com/us/app/bigbluebutton-tablet/id1641156756',
|
||||||
|
@ -83,6 +83,8 @@ public:
|
|||||||
allowFullscreen: true
|
allowFullscreen: true
|
||||||
preloadNextSlides: 2
|
preloadNextSlides: 2
|
||||||
warnAboutUnsavedContentOnMeetingEnd: false
|
warnAboutUnsavedContentOnMeetingEnd: false
|
||||||
|
# Flag used to enable apollo dev tools in production
|
||||||
|
enableApolloDevTools: false
|
||||||
# Allows users to enable automatic transcription when joining a meeting.
|
# Allows users to enable automatic transcription when joining a meeting.
|
||||||
# Automatic transcription requires the browser to support the web
|
# Automatic transcription requires the browser to support the web
|
||||||
# speech API, which involves sending voice data to third-party servers!
|
# speech API, which involves sending voice data to third-party servers!
|
||||||
|
Loading…
Reference in New Issue
Block a user