rx-query icon indicating copy to clipboard operation
rx-query copied to clipboard

Add Dev Tools

Open MartinJaskulla opened this issue 3 years ago • 0 comments

Hey,

I am trying to show the number of queries which are fetching right now.

Screenshot 2021-03-05 at 07 44 02

However there is something I don't understand, so I provided this commit with some console.logs.

  • npm start
  • clear the console
  • Enable network throttling Slow 3G
  • Hover over Rick Sanchez

The network request is made and this gets logged immediately

Screenshot 2021-03-05 at 08 04 01

After 1s the network request comes back and this gets logged Screenshot 2021-03-05 at 08 04 03

This makes it impossible for me to show the currently fetching requests in the dev tools, because after the loading state is correctly emitted (between queryCache: 4 and queryCache: 5), the cache$ in the dev tool immediately emits again with the loading state missing (between queryCache: 5 and queryCache: 6).

Should prefetch() unsubscribe only after a successful response and not immediately? Could this be the reason for my issue? (I am still struggling to understand the code base)

MartinJaskulla avatar Mar 05 '21 07:03 MartinJaskulla