All this errors can be erased if you make this change on main.ts
import { createApp, h, provide, render } from ‘vue’
import App from ‘./App.vue’
import router from ‘./router’
// import vuetify from ‘./plugins/vuetify’
import ‘vuetify/styles’
import { createVuetify } from ‘vuetify’
import { loadFonts } from ‘./plugins/webfontloader’
import * as components from ‘vuetify/components’
import * as directives from ‘vuetify/directives’
//import { apolloClient } from ‘@/api/apollo/apolloClient’
import { ApolloClient, createHttpLink, InMemoryCache } from ‘@apollo/client/core’
import { DefaultApolloClient } from ‘@vue/apollo-composable’
const vuetify = createVuetify({
components,
directives
})
// HTTP connection to the API
const httpLink = createHttpLink({
// You should use an absolute URL here
uri: ‘http://localhost:4000/graphql’
})
// Cache implementation
const cache = new InMemoryCache()
// Create the apollo client
const apolloClient = new ApolloClient({
link: httpLink,
cache
})
const app = createApp({
setup() {
provide(DefaultApolloClient, apolloClient)
},
render: () => h(App)
})
app.use(router).use(vuetify).mount(‘#app’)
-
This reply was modified 7 months, 1 week ago by Acenollari.