score:1

Accepted answer

From the docs, the type of refetch is :

 type myinfoProps= {
    refetch?: (options: { throwOnError: boolean, cancelRefetch: boolean }) => Promise<UseQueryResult>;
    loading: boolean;
    data: {}
};

While calling you will have to check if it is defined or not since it is an optional property :

export const myinfo= ({
    refetch,
    loading,
    data,
}: myinfoProps) => {
  if(refetch){
         refetch(/* parameters */);
    }

}

Related Query

More Query from same tag