import LOGOUT_MUTATION from '@/graphql/gql/mutations/logoutUser';

export default {
  methods: {
    logout() {
      this.$apollo.mutate({
        mutation: LOGOUT_MUTATION,
      }).then(({data}) => {
        if (data.logout.success) {
          location.replace('/');
        }
      });
    }
  }
};
