mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
22 lines
502 B
JavaScript
22 lines
502 B
JavaScript
|
import 'babel-polyfill'
|
||
|
import Vue from 'vue'
|
||
|
import VueApollo from 'vue-apollo'
|
||
|
import { ApolloClient, createNetworkInterface } from 'apollo-client'
|
||
|
|
||
|
Vue.use(VueApollo)
|
||
|
|
||
|
const API_ENDPOINT = 'https://api.graph.cool/simple/v1/cj1dqiyvqqnmj0113yuqamkuu'
|
||
|
|
||
|
const apolloClient = new ApolloClient({
|
||
|
networkInterface: createNetworkInterface({
|
||
|
uri: API_ENDPOINT,
|
||
|
transportBatching: true
|
||
|
})
|
||
|
})
|
||
|
|
||
|
const apolloProvider = new VueApollo({
|
||
|
defaultClient: apolloClient
|
||
|
})
|
||
|
|
||
|
export default apolloProvider
|