Intended outcome:
If refetchQueries causes a <Query> be refetched, the loading render-prop argument should be true while it is refetching.
Actual outcome:
The loading render-prop argument remains false, but eventually the correct data does load.
This seemingly makes it impossible to change the UI state while the data is stale. For example I want to grey out an "Add" button after a mutation while the query is still reloading so people can't double click and cause duplicates.
Versions
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
Did you try adding notifyOnNetworkStatusChange: true?
Also, there's awaitRefetchQueries option, which doen't resolve mutation promise, until all refetching queries are resolved.
I did try notifyOnNetworkStatusChange but it didn't help unfortunately.
Also, there's
awaitRefetchQueriesoption, which doen't resolve mutation promise, until all refetching queries are resolved.
Perfect, thanks!
Most helpful comment
Also, there's
awaitRefetchQueriesoption, which doen't resolve mutation promise, until all refetching queries are resolved.