0👍
✅
Fixed by making variables
not a function in my await…
async getCartItems({ commit, getters }) {
const getCartId = await getters.getCartId
const { data } = await this.app.apolloProvider.defaultClient.query({
query: getCart,
variables: {
cartId: getCartId
},
skip() {
return !getCartId
}
})
if (data.cart) {
commit('updateCartObj', data.cart)
} else {
console.log('getCartItems Error' + data)
}
},
Source:stackexchange.com