1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-apollo/lib
Jerome Fitzgerald a450502a0d [fix] with-apollo: Cannot read property 'data' (#3226)
* [fix] with-apollo: Cannot read property 'data'

When we create the initial serverState, we need to create the
 eventual construct of the Apollo Data to reside within

Later in the constructor this allows for the initApollo to either
 be generated from SSR, or to init from scratch.

Fixes
> Cannot read property 'data' of undefined
> TypeError: Cannot read property 'data' of undefined

* [refactor] with-apollo: reduce init `serverState`

No need to explicitly set `data` as empty.
This trims up 4 lines. 😀
2017-11-04 11:24:16 +01:00
..
initApollo.js with-apollo example using Apollo 2 (#3180) 2017-10-28 09:19:56 +02:00
withData.js [fix] with-apollo: Cannot read property 'data' (#3226) 2017-11-04 11:24:16 +01:00