[fix] Increment cache version after object/field/relation update (#5316)
Fixes #5276. Updates were not triggering a cache version incrementation because they do not trigger migrations while that is where the caching version logic was. We have decided to move the cache incrementation logic to the services.
This commit is contained in:
@ -2,7 +2,7 @@ import { useMutation } from '@apollo/client';
|
||||
import { getOperationName } from '@apollo/client/utilities';
|
||||
|
||||
import {
|
||||
UpdateObjectInput,
|
||||
UpdateOneObjectInput,
|
||||
UpdateOneObjectMetadataItemMutation,
|
||||
UpdateOneObjectMetadataItemMutationVariables,
|
||||
} from '~/generated-metadata/graphql';
|
||||
@ -27,8 +27,8 @@ export const useUpdateOneObjectMetadataItem = () => {
|
||||
idToUpdate,
|
||||
updatePayload,
|
||||
}: {
|
||||
idToUpdate: UpdateOneObjectMetadataItemMutationVariables['idToUpdate'];
|
||||
updatePayload: UpdateObjectInput;
|
||||
idToUpdate: UpdateOneObjectInput['id'];
|
||||
updatePayload: UpdateOneObjectInput['update'];
|
||||
}) => {
|
||||
return await mutate({
|
||||
variables: {
|
||||
|
||||
Reference in New Issue
Block a user