You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template>
<div>
{{ $cookies.get('customerId') }} // this works
</div>
</template>
<script>
import CUSTOMER from "~/graphql/queries/CUSTOMER.gql";
export default {
created() {
console.log(this.$cookies.get('customerId)) // this works on both server and client
},
apollo: {
customer: {
query: CUSTOMER,
prefetch: true,
variables(){
return {
customerId: this.$cookies.get('customerId) // this doesn't work
}
}
}
}
}
The text was updated successfully, but these errors were encountered:
I'm https://github.com/S64/vue-universal-cookies to use cookies on both server side and client side. This library works perfectly. However if I use it as a variable in the query, it doesn't work. Any idea?
The text was updated successfully, but these errors were encountered: