async function onLogin(apolloClient, token) {
  if (typeof localStorage !== 'undefined' && token) {
    localStorage.setItem(AUTH_TOKEN, token)
  }
  if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient)
  try {
    await apolloClient.resetStore()
  } catch (e) {
    // eslint-disable-next-line no-console
    // console.log( '%cError on cache reset (login)', 'color: orange;', e.message )
  }
}
// Manually call this when user log in
Manually call this when user log in
Manually call this when user log in
async function onLogin(apolloClient, token) {
  if (typeof localStorage !== 'undefined' && token) {
    localStorage.setItem(AUTH_TOKEN, token)
  }
  if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient)
  try {
    await apolloClient.resetStore()
  } catch (e) {
  }
}
async function onLogin ( apolloClient , token ) { if ( typeof localStorage !== 'undefined' && token ) { localStorage . setItem ( AUTH_TOKEN , token ) } if ( apolloClient . wsClient ) restartWebsockets ( apolloClient . wsClient ) try { await apolloClient . resetStore ( ) } catch ( e ) { } }
Manually call this when user log in
Manually call this when user log in
// eslint-disable-next-line no-console // console.log( '%cError on cache reset (login)', 'color: orange;', e.message )