import 'babel-polyfill';

import Vue from 'vue';

import ApolloClient, { createNetworkInterface } from 'apollo-client';
import VueApollo from 'vue-apollo';
import config from './clientConfig.json';

const apolloClient = new ApolloClient({
  networkInterface: createNetworkInterface({
    uri: config.graphqlUrl,
    transportBatching: true
  })
});
Vue.use(VueApollo);

const apolloProvider = new VueApollo({
  defaultClient: apolloClient,
})

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css'
import lang from 'element-ui/lib/locale/lang/en';
import locale from 'element-ui/lib/locale';
locale.use(lang);
Vue.use(ElementUI);

import store from './store.js';
import router from './router.js';
import { sync } from 'vuex-router-sync';
sync(store, router);

import App from './App.vue';

//Vue.config.performance = true;

new Vue({
  el: '#app',
  render: h => h(App),
  renderError (h, err) {
    return h('pre', { style: { color: 'red' }}, err.stack)
  },
  store,
  router,
  apolloProvider
})

@@ -68,24 +68,32 @@
 nt, %7B create
+Batching
 NetworkInter
@@ -266,16 +266,24 @@
 : create
+Batching
 NetworkI
@@ -329,31 +329,25 @@
     
-transportBatching: true
+batchInterval: 10
 %0A  %7D

use batching for graphql queries