import { useMutation } from '@apollo/client';
      
      const [mutationFunction] = useMutation(graphqlQuery, {
        refetchQueries: [{ query: queryToRefetch }],
      });
      // insert your logic code here
      mutationFunction({
        variables: {
          variableName: variableValue,
        },
      });
      
      Javascript language logo

      useMutation

      graphql
      apollo
      GraphQL and JavaScript

      Trigger useMutation() with apollo client.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.