Files
apollo/types/test/index.ts
T
joe-re 8dcdb9299f TypeScript support (#160)
* TypeScript support

* set defaultOptions key to VueApollo constructor
2017-12-22 14:38:05 +01:00

19 lines
639 B
TypeScript

import Vue from 'vue'
import 'isomorphic-fetch'
import { ApolloClient } from 'apollo-client'
import { HttpLink } from 'apollo-link-http'
import { ApolloLink, split } from 'apollo-link'
import { getMainDefinition } from 'apollo-utilities'
import VueApollo from '../index'
import App from './App'
const httpLink = new HttpLink({ uri: 'https://dummy.test.com' })
const cache: any = 'dummy cache';
const apolloClient = new ApolloClient({ link: httpLink, cache, connectToDevTools: true })
const apolloProvider = new VueApollo({ defaultClient: apolloClient })
Vue.use(VueApollo)
new Vue({ el: '#app', apolloProvider, render: h => h(App), })