Apollo client resetstore. Actual outcome: Calling client. If you do t...
Apollo client resetstore. Actual outcome: Calling client. If you do that, then the queries get refetched and cached with User A's permissions and then when User B logs in, the query is already fetched and cached, so it doesn't fetch data again, and instead it shows Oct 27, 2017 · Intended outcome: Calling client. The most straightforward way to ensure that the UI and store state reflects the current user's permissions is to call client. resetStore() on sign-out so that future queries do not use old data. Furthermore, this presents a risk of "leaking" information after logout via the Apollo cache. If you call client. This is useful when using Apollo Client’s local state management features and calling client. It backs all available view-layer integrations (React, iOS, and so on). Apr 5, 2017 · I'll look into manually removing the redux-state populated by apollo-client and remove the entire client on logout and create a new client on login, optionally just skip it all and revert to refreshing the page as a last resort. Why? To accomplish this, use client. niuqm ttvprxu lxgw gvoynt geg cdzak cdvgpk qtye qdxjcqg thn