Created
September 3, 2022 01:35
-
-
Save joshmenden/247b2f3523185b6a9b49851b6365ed5a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { provide, createApp, h } from 'vue' | |
| import { ApolloClients } from '@vue/apollo-composable' | |
| import { UseApolloClients } from './src/util/useApolloClients.js' | |
| import App from './App.vue' | |
| // keep your URLs as env variables for easy dev/prod switching | |
| const { | |
| VITE_GQL_URL_1: URL1, | |
| VITE_GQL_URL_2: URL2 | |
| } = import.meta.env | |
| const app = createApp({ | |
| name: 'MyApp', | |
| setup() { | |
| provide(ApolloClients, UseApolloClients(URL1, URL2)) | |
| }, | |
| render: () => h(App), | |
| }) | |
| // other packages you might use... | |
| // app.use(router) | |
| // app.use(createPinia()) | |
| app.mount('#app') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment