isFetching
did it for me. I had to change status === "pending"
to isFetching
and then render the relevant component. Example below:
{(isFetching) ? <SkeletonComponent /> : <> Some component</> }
Then use query invalidation to manually trigger the refresh based on some mutations.