text: import React from "react";
  import ReactDOM from "react-dom";
  
  import App from "./App";
  import * as serviceWorker from "./serviceWorker";
  
  import { createStore, compose, applyMiddleware } from "redux";
  import thunk from "redux-thunk";
  import { Provider } from "react-redux";
  import reducer from "./store/reducers/auth";
  
  // for graphql
  import { ApolloProvider } from "react-apollo";
  import { ApolloClient } from "apollo-client";
  import { createHttpLink } from "apollo-link-http";
  import { InMemoryCache } from "apollo-cache-inmemory";
  // end for graphql
  
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
  const store = createStore(reducer, composeEnhancers(applyMiddleware(thunk)));
  
  // for graphql
  const httpLink = createHttpLink({
    uri: "https://kodebaik.herokuapp.com/graphql/"
  });
  const client = new ApolloClient({
    link: httpLink,
    cache: new InMemoryCache()
  });
  // end for graphql
  
  const app = (
    <Provider store={store}>
      <ApolloProvider client={client}>
        <App />
      </ApolloProvider>
    </Provider>
  );
  
  ReactDOM.render(app, document.getElementById("root"));
  
  // If you want your app to work offline and load faster, you can change
  // unregister() to register() below. Note this comes with some pitfalls.
  // Learn more about service workers: http://bit.ly/CRA-PWA
  serviceWorker.unregister();
  