-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I'm having a bit of an issue whereby upon firing a login mutation 'data' returns a user token. The token should then be stored via an action call, and the user is then redirected to the main site.
But the token action and the redirect are not acted upon, and the action to complete a user login simply continues to cycle round over and over (See image).
What is the issue here?
store.js
effect: (effect, action) => {
switch (effect.type) {
case 'query':
return client.query({...effect}).then(({data}) => data);
case 'mutation':
return client.mutate({...effect})
.then(({data}) => {
store.dispatch(authToken(data.signinUser.token));
this.context.router.history.push('/');
});
default:
}
}
Metadata
Metadata
Assignees
Labels
No labels
