title: How to get data from react query "useQuery" hook in a specific type
body: <p>When we get data from useQuery hook, I need to parse the data a specific type before it return to user. I want data which return from useQuery hook should be of &quot;MyType&quot; using the parsing function i created below. I am unable to find method to use my parsing function. Is there any way to do it? I don't want to rely on schema structure for data type.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>type MyType = {
  id: number;
  //some more properties
  }
  
  function parseData(arr: any[]): MyType[]{
    return arr.map((obj, index)=&gt;{
      return {
        id: arr.id,
        //some more properties
      }
    })
  }
  
  const {data} = await useQuery('fetchMyData', async ()=&gt;{
      return await axios.get('https://fake-domain.com')
    }
  )</code></pre>
  </div>
  </div>
  </p>