Skip to content

Commit

Permalink
fix(apollo): add provider to app
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Jul 16, 2022
1 parent 5935190 commit ac38f78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nuxt/plugins/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import VueApollo from 'vue-apollo'

Vue.use(VueApollo)

export default (_: Context, inject: Inject) => {
export default ({ app }: Context, inject: Inject) => {
const httpLink = createHttpLink({
uri: process.server
? 'http://postgraphile:5000/graphql'
Expand Down Expand Up @@ -42,5 +42,7 @@ export default (_: Context, inject: Inject) => {
defaultClient: apolloClient,
})

app.apolloProvider = apolloProvider

inject('apolloProvider', apolloProvider)
}

0 comments on commit ac38f78

Please sign in to comment.