Performance improvement to dev xp (#9294)
The DX is not great when you need to do a lot of database resets/command. Should we disable Typescript validation to speed things up? With this and caching database:reset takes 1min instead of 2 on my machine. See also: https://github.com/typeorm/typeorm/issues/4136 And #9291 / #9293 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -12,6 +12,12 @@ jest.mock('@/workspace/hooks/useIsFeatureEnabled', () => ({
|
||||
useIsFeatureEnabled: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('~/generated/graphql', () => ({
|
||||
FeatureFlagKey: {
|
||||
IsAggregateQueryEnabled: 'IsAggregateQueryEnabled',
|
||||
},
|
||||
}));
|
||||
|
||||
describe('useRefetchAggregateQueries', () => {
|
||||
const mockRefetchQueries = jest.fn();
|
||||
const mockApolloClient = {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { getAggregateQueryName } from '@/object-record/utils/getAggregateQueryName';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { useApolloClient } from '@apollo/client';
|
||||
import { FeatureFlagKey } from '~/generated/graphql';
|
||||
|
||||
export const useRefetchAggregateQueries = ({
|
||||
objectMetadataNamePlural,
|
||||
@ -9,7 +10,7 @@ export const useRefetchAggregateQueries = ({
|
||||
}) => {
|
||||
const apolloClient = useApolloClient();
|
||||
const isAggregateQueryEnabled = useIsFeatureEnabled(
|
||||
'IS_AGGREGATE_QUERY_ENABLED',
|
||||
FeatureFlagKey.IsAggregateQueryEnabled,
|
||||
);
|
||||
const refetchAggregateQueries = async () => {
|
||||
if (isAggregateQueryEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user