Commit 1a8bdba5 authored by Brice BERNARD's avatar Brice BERNARD Committed by Tim Neutkens

[with-apollo-auth] Remove useless apolloState from App's props (#4554)

App component does not need/use apolloState prop, so let's remove it. If I'm wrong please explain me the purpose of this.
parent a411b355
...@@ -24,7 +24,6 @@ export default App => { ...@@ -24,7 +24,6 @@ export default App => {
static async getInitialProps(ctx) { static async getInitialProps(ctx) {
const { Component, router, ctx: { req, res } } = ctx const { Component, router, ctx: { req, res } } = ctx
const apolloState = {}
const apollo = initApollo({}, { const apollo = initApollo({}, {
getToken: () => parseCookies(req).token getToken: () => parseCookies(req).token
}) })
...@@ -51,7 +50,6 @@ export default App => { ...@@ -51,7 +50,6 @@ export default App => {
{...appProps} {...appProps}
Component={Component} Component={Component}
router={router} router={router}
apolloState={apolloState}
apolloClient={apollo} apolloClient={apollo}
/> />
) )
...@@ -69,7 +67,7 @@ export default App => { ...@@ -69,7 +67,7 @@ export default App => {
} }
// Extract query data from the Apollo's store // Extract query data from the Apollo's store
apolloState.data = apollo.cache.extract() const apolloState = { data: apollo.cache.extract() }
return { return {
...appProps, ...appProps,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment