Lucas Genzelis

Results 52 comments of Lucas Genzelis

Thanks @hirbod ! But I don't fell that applies in the context of infinite queries. I don't want to cancel a request for page 7 if I just need to...

To your first comment, @TkDodo , I'd argue this is a bug. I've looked into [onFetch in infiniteQueryBehavior.ts](https://github.com/tannerlinsley/react-query/blob/master/src/core/infiniteQueryBehavior.ts#L18) and it seems that what react-query is doing is: 1. Get current...

> a refetch starts due to some invalidation In that scenario, yes, I agree with you, and I don't see a way around it. But what if there is no...

Thanks a lot for looking into this @TkDodo ! I tried tweaking some stuff in the code, but you're right, it's not an easy task. I feel intimidated by the...

I've been thinking of ways to get around this issue. Is there any way to get a callback or a promise that resolves once the query finish fetching? Currently I...

Thanks @donysukardi ! I'm hoping there's a way to do it with the public API though 🙏 In the same file that you linked, I see an [addObserver](https://github.com/tannerlinsley/react-query/blob/master/src/core/query.ts#L326) method that...

Thanks @TkDodo , but no, I can't do that :( , because the place where I need to await for the infinite query to finish is not inside a react...

I'd like to share my workaround, in case anyone else ever runs into this issue: ```typescript const queryKey = ['my-infinite-query']; const isSomePageFetching = queryClient.getQueryState(queryKey)?.isFetching; if (isSomePageFetching) { await new Promise((resolve)...

@bujardeari here's the [same example which I used to show the bug, but adding that workaround](https://codesandbox.io/s/useinfinitequery-bug-workaroung-vwfo9n?file=/src/App.js) (lines 26 to 38). If you now click "update first page" while another page...

> @ChillyBots update cypress-io/github-action@v2 to v4.1.0 Worked for me! Thanks @developer-ocansey :)