Do not reset store when user is authenticated. Instead clear cache.

This commit is contained in:
Hassan Azmi
2020-08-18 13:58:59 -04:00
parent fd4f90173b
commit 2d7514fbde

View File

@@ -27,7 +27,7 @@ const Login = () => {
const handleLogin = (email, password) => {
authenticateUser({ variables: { email, password } })
.then(({ data }) => {
client.resetStore();
client.cache.reset();
updateToken(data.authenticateUser);
history.push('/');
})