File tree 1 file changed +3
-5
lines changed
examples/with-apollo-auth/lib 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ export default App => {
17
17
return class WithData extends React . Component {
18
18
static displayName = `WithData(${ App . displayName } )`
19
19
static propTypes = {
20
- apolloState : PropTypes . shape ( {
21
- data : PropTypes . object . isRequired
22
- } ) . isRequired
20
+ apolloState : PropTypes . object . isRequired
23
21
}
24
22
25
23
static async getInitialProps ( ctx ) {
@@ -67,7 +65,7 @@ export default App => {
67
65
}
68
66
69
67
// Extract query data from the Apollo's store
70
- const apolloState = { data : apollo . cache . extract ( ) }
68
+ const apolloState = apollo . cache . extract ( )
71
69
72
70
return {
73
71
...appProps ,
@@ -79,7 +77,7 @@ export default App => {
79
77
super ( props )
80
78
// `getDataFromTree` renders the component first, the client is passed off as a property.
81
79
// After that rendering is done using Next's normal rendering pipeline
82
- this . apolloClient = initApollo ( props . apolloState . data , {
80
+ this . apolloClient = initApollo ( props . apolloState , {
83
81
getToken : ( ) => parseCookies ( ) . token
84
82
} )
85
83
}
You can’t perform that action at this time.
0 commit comments