Delete update mutation doesnt work

Do you have a function named updateMessage that receives the variables block and then executes the gql via a GraphQL client (like Apollo). Because in your example code, I see a call to updateMessage with a variables JSON object passed to it, but there is no function definition for it.

EDIT: Example from my codebase (uses SvelteQuery and Awesome GraphQL Client)

  import { graphQLClient } from '$lib/configs/awesome-graphql-client.ts';
  import { UpsertWordMutation } from '$lib/graphql/mutations/words.graphql';

  const upsertWordRequest = useMutation((variables) => {
    return graphQLClient.request(UpsertWordMutation, variables);
  });

  function mutateWord(updatedWord, onSuccessFn) {
    try {
      $upsertWordRequest.mutate({ input: updatedWord }, {
        onSuccess: onSuccessFn
      });
    } catch(error) {
      console.log(error);
    }
  }