-
Notifications
You must be signed in to change notification settings - Fork 786
Refetched query not updating "loading" prop #1347
Comments
@tnrich would you be able to create a small reproduction showing this? |
@jbaxleyiii here ya go: https://codesandbox.io/s/ym1pwrjmzx as you can see, the "Loading…" message appears on the initial load, but it does not show up on subsequent presses of the "Add Person Button" (even though the "people" query is getting run again by refetchQueries). Please let me know if you have any questions about the implementation. |
Yeah same issue here #1331 |
* redefine refetch function, if option.notifyOnLoadingStatusChange is true, we forceUpdate * after calling original refetch to pass the new dataProps to the wrappedComponent. * That can makes WrappedComponent be able to watch on loading status;
Im experiencing the same issue, get the loading container as per the recipe in apollo docs for initial load - this does not appear on pagination queries using fetchMore because 'loading' variable is not updated. |
how is it going? |
I just ran into this issue as well. I tried to proxy into the loading state with I'm getting around this for now by passing This is working fine, but |
Any update on this? It seems like a huge limitation. |
This should no longer be an issue with current day |
Hey there,
I've got a component that is wrapped with an apollo query. I use react-apollo's "refetchQueries" to cause that query to update itself (after a mutation is run by a separate component). The new data is getting fetched, but unfortunately, the "loading" prop for that mutation does not appear to be getting changed. Thus I am not able to get a spinner to show over the component while it's updated data is getting loaded.
Is this how refetch queries is set up to work?
Is there a way to get the components interested in the query to be made aware that a fresh query is being made?
Hope that all makes sense.
Thanks!
The text was updated successfully, but these errors were encountered: