Backup before moving state to app.js

This commit is contained in:
Patrick Fic
2019-12-05 19:46:46 -08:00
parent d2f684f4ed
commit ce4e3be9d5
2 changed files with 11 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
export default {
currentSelectedNavItem: null,
currentUser: null,
token: null
};

View File

@@ -7,6 +7,7 @@ import { createHttpLink } from "apollo-link-http";
import { InMemoryCache } from "apollo-cache-inmemory";
import { ApolloClient } from "apollo-boost";
import { typeDefs, resolvers } from "./graphql/resolvers";
import initialState from "./graphql/initial-state";
// require('dotenv').config()
import * as serviceWorker from "./serviceWorker";
@@ -14,26 +15,23 @@ import * as serviceWorker from "./serviceWorker";
import "./index.css";
import { default as App } from "./App/App.container";
const token = client.readQuery
const httpLink = createHttpLink({
uri: "https://bodyshop-dev-db.herokuapp.com/v1/graphql"
});
const cache = new InMemoryCache();
const client = new ApolloClient({
link: httpLink,
cache,
cache: new InMemoryCache(),
typeDefs,
resolvers
});
client.writeData({
data: {
currentSelectedNavItem: null,
currentUser: null,
authState: null,
gqlToken: null
}
data: initialState
});
ReactDOM.render(