diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-02-15 16:59:58 -0500 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-02-15 16:59:58 -0500 |
| commit | 8f2c595eca30e2d7138c8e8d6685774a8f44e55d (patch) | |
| tree | 3408b9c8eb3b0ea43cb72e13e0bd6393ab5bac61 /frontend/lib/initApollo.js | |
| parent | a09b01abf7c03e6b7e43f2175e5a34501808821b (diff) | |
omg
Diffstat (limited to 'frontend/lib/initApollo.js')
| -rw-r--r-- | frontend/lib/initApollo.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/frontend/lib/initApollo.js b/frontend/lib/initApollo.js index 45f0fec..e86c7e1 100644 --- a/frontend/lib/initApollo.js +++ b/frontend/lib/initApollo.js @@ -20,20 +20,19 @@ function create(initialState) { const stateLink = withClientState({ cache, defaults: { - networkStatus: { - __typename: 'NetworkStatus', + uiData: { + __typename: 'UIData', isConnected: true, - isCartOpen: true, + isCartOpen: false, }, }, resolvers: { Mutation: { - updateNetworkStatus: (_, { isConnected }, { cache }) => { - console.log(isConnected); + setLocalData: (_, values, { cache }) => { const data = { - networkStatus: { - __typename: 'NetworkStatus', - isConnected, + uiData: { + __typename: 'UIData', + ...values, }, }; cache.writeData({ data }); |
