react-apollo-hooks
react-apollo-hooks copied to clipboard
Missing `setVariables` network status
When setting new variables using useQuery
, the networkStatus
is always 1
(loading
). This is not the case with the Query
component which returns 2
(setVariables
).
Example with useQuery
: https://codesandbox.io/s/ox93pjm0w5
Example with Query
component: https://codesandbox.io/s/3xp667vonm
It also resets data
when querying an uncached query which is not desirable. See Query
component example for expected behaviour which does not return to Loading...
state when variables change.
I think this is a dupe of #117, but the info you provided are way clearer. I wasn't aware of this networkStatus
flag
It seems the data issue is a dupe. The setVariable status is separate though.
We are having to avoid using this package for these reasons as it is not inline with current react-apollo functionality 😞
I wonder if they are related, maybe the networkStatus
is wrong because of some wrong command that leads to the empty data.
It looks like the queries always get called as brand new, rather than as "updated with new variables", and that may lead to these inconsistencies
It will be fixed by #134 (which also solves #117).