Use main apollo client for workflows (#9675)

We were using metadata client by legacy. Architecture is not great for
Core engine: workflows are available both in data and metadata client.
It makes more sense to use the data client since workflows are part of
standard objects
This commit is contained in:
Thomas Trompette
2025-01-16 15:21:29 +01:00
committed by GitHub
parent df93b5b311
commit 7ec48b93eb
5 changed files with 9 additions and 18 deletions

View File

@ -1,4 +1,3 @@
import { useApolloMetadataClient } from '@/object-metadata/hooks/useApolloMetadataClient';
import { useApolloClient, useMutation } from '@apollo/client';
import { triggerUpdateRecordOptimisticEffect } from '@/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffect';
@ -13,13 +12,12 @@ import {
} from '~/generated/graphql';
export const useActivateWorkflowVersion = () => {
const apolloMetadataClient = useApolloMetadataClient();
const apolloClient = useApolloClient();
const [mutate] = useMutation<
ActivateWorkflowVersionMutation,
ActivateWorkflowVersionMutationVariables
>(ACTIVATE_WORKFLOW_VERSION, {
client: apolloMetadataClient,
client: apolloClient,
});
const { objectMetadataItem: objectMetadataItemWorkflowVersion } =