2759825251
* * created vuepress docs * chore: upgrade deps * docs: patreon link * Docs changes
398 B
398 B
Create a provider
Like vue-router or vuex, you need to specify the apolloProvider object on your root components. A provider holds the apollo client instances that can then be used by all the child components.
const apolloProvider = new VueApollo({
defaultClient: apolloClient,
})
new Vue({
el: '#app',
provide: apolloProvider.provide(),
render: h => h(App),
})