vue-apollo.ts 307 B

123456789101112131415
  1. import Vue from "vue"
  2. import VueApollo from "vue-apollo"
  3. import { apolloClient } from "~/helpers/apollo"
  4. const vueApolloProvider = new VueApollo({
  5. defaultClient: apolloClient as any,
  6. })
  7. Vue.use(VueApollo)
  8. export default (ctx: any) => {
  9. const { app } = ctx
  10. app.apolloProvider = vueApolloProvider
  11. }