title: typescript react-query mutation error TS2554: Argument of type
body: <p>I'm new with typescript i use <code>react-query</code> try to us <code>mutate</code> but it cause an error</p>
  <pre><code>TS2554: Expected 1-2 arguments, but got 3.
  </code></pre>
  <p>iterface:</p>
  <pre><code>interface ChangePassword{
      email: string;
      password: string;
      confirmPassword: string
  }
  
  </code></pre>
  <p>function:</p>
  <pre><code> const changePasswordOnClick = useMutation&lt;Record&lt;string, string&gt;, unknown, ChangePassword&gt;(
          () =&gt; axios.post(
              url,
              { email, password, new_password}, // all fine
          ),
          {
              onSuccess: (req) =&gt; {
                  console.log('Request', req)
  
              },
  
              onError: (newLogin) =&gt; {
                  console.log('onError', newLogin);
              },
          },
      );
  </code></pre>
  <p>Problem (just piece of problem code):</p>
  <pre><code>onSubmit={async (data,
  {setSubmitting, resetForm})=&gt;{setSubmitting(true)                                 
                    changePasswordOnClick.mutate(
                       data.email, 
                      data.password, 
                      data.confirmPassword)} // TS2554: Expected 1-2 arguments, but got 3.
  
  </code></pre>
  <p>Why i'm getting this error? how to fix it?</p>