Created
November 15, 2019 14:49
-
-
Save jgilbertcastro/ba67e8f2982c8f687e8ed526d736ec87 to your computer and use it in GitHub Desktop.
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
import Vue from "vue"; | |
import App from "./App.vue"; | |
import router from "./router"; | |
import store from "./store"; | |
//import apolloclient and vueapollo | |
import ApolloClient from "apollo-boost"; | |
import VueApollo from "vue-apollo"; | |
Vue.config.productionTip = false; | |
// define const apolloClient to set graphql api url | |
const apolloClient = new ApolloClient({ | |
uri: "http://localhost:4000/graphql" | |
}); | |
//add vueApollo plugin to global method | |
Vue.use(VueApollo); | |
const apolloProvider = new VueApollo({ | |
defaultClient: apolloClient | |
}); | |
new Vue({ | |
router, | |
store, | |
render: h => h(App), | |
apolloProvider | |
}).$mount("#app"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment