Last active
April 4, 2020 14:19
-
-
Save SurbhiKatariya/a09f5abff61c7047ae1379a979537d90 to your computer and use it in GitHub Desktop.
Add apolloProvider in vue instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the apollo client | |
const apolloClient = new ApolloClient({ | |
link, | |
cache: new InMemoryCache(), | |
connectToDevTools: true | |
}) | |
const apolloProvider = new VueApollo({ | |
defaultClient: apolloClient | |
}) | |
new Vue({ | |
router, | |
apolloProvider, | |
apolloClient, | |
render: h => h(App) | |
}).$mount('#app') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment