relay-tools / relay-hooks

Use Relay as React hooks
https://relay-tools.github.io/relay-hooks/docs/relay-hooks.html
MIT License
540 stars 56 forks source link

After skip query is disposed and not retained any more #152

Closed aleksandrlat closed 3 years ago

aleksandrlat commented 3 years ago

Looks like some issue after query is skipped in new version 4

Steps to reproduce:

Steps are complex and this case is rare. But looks like I debugged it correctly. I think there maybe other scenarios when query is not retained after it is disposed on skip because of this condition https://github.com/relay-tools/relay-hooks/blob/v4.0.0/src/FetchResolver.ts#L117

morrys commented 3 years ago

hi @aleksandrlat, thanks for your detailed debugging 👍

I created this PR https://github.com/relay-tools/relay-hooks/pull/153 in draft which should fix your problem.

it is in draft because I have to do further tests but it would be very useful to have your feedback

morrys commented 3 years ago

released with version 4.1.0