import { useMutation } from '@apollo/client';
      
      const [createAPIToken] = useMutation(GRAPHQL_MUTATION, { 
        variables: {
          //
        },
        onCompleted: (data) => {
        	//
        });
      Javascript language logo
      your recipe card header background

      Apollo React useMutation hook

      react
      apollo
      hook
      ...
      React JavaScript Recipes

      Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects. For this purpose, React Query exports a useMutation hook.

      Library: react

      Shortcut: apollo.hook.mutation.use

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.