fix: graphql error notifications

This commit is contained in:
Nicolas Giard
2019-01-12 22:33:30 -05:00
parent 7e62c01ed1
commit 959f2ebde1
9 changed files with 42 additions and 58 deletions

View File

@@ -47,6 +47,13 @@ export default new Vuex.Store({
},
updateNotificationState (state, newState) {
state.notification.isActive = newState
},
pushGraphError (state, err) {
WIKI.$store.commit('showNotification', {
style: 'red',
message: _.get(err, 'graphQLErrors[0].message', err.message),
icon: 'warning'
})
}
},
actions: { },