Hi, i still getting this error for unknown reason:
[Vue warn]: Property or method "$_apollo" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
Here is my config:
import Vue from 'vue'
import VueApollo from 'vue-apollo'
import { ApolloClient } from 'apollo-client'
import { createHttpLink } from 'apollo-link-http'
import { setContext } from 'apollo-link-context'
import { InMemoryCache } from 'apollo-cache-inmemory'
import { LocalStorage } from 'ttl-localstorage'
const httpLink = createHttpLink({
uri: 'http://example.test/graphql',
credentials: 'include'
})
const authLink = setContext(async (_, { headers }) => {
// get the authentication token from local storage if it exists
let token = await LocalStorage.get('token')
// return the headers to the context so httpLink can read them
return {
headers: {
...headers,
Cookie: 'XDEBUG_SESSION=phpstorm',
Authorization: token,
'X-Requested-With': 'XMLHttpRequest',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
}
})
const apolloClient = new ApolloClient({
link: authLink.concat(httpLink),
cache: new InMemoryCache()
})
const apolloProvider = new VueApollo({
defaultClient: apolloClient
})
Vue.use(VueApollo)
window.vue = new Vue({
...App,
router,
store,
apolloProvider
}).$mount('#app')
Hi, i still getting this error for unknown reason:
Here is my config:
Any ideas what could be wrong? thx