* [refactor] with-apollo-and-redux: 2.0.0
- This ports over `with-apollo` (w/ recent `withRouter` fix and addition
for Post) along with implementing `apollo-cache-redux` #3463
- The `redux` side of things is lacking (it is the *same* as the
original example)
- Created a `routes.js` for use on Server and Client Side (to expand the
PostList functionality)
- SSR is maintained
- Redid the "PostVote" a bit... sorry. 😬️
Possible todo(s):
- Add in API and Clock Examples from `with-redux` to show Apollo and
Redux working together a bit more
- redux-saga (I personally use this, may be too opinionated for the base
example though)
Packages updated:
- apollo-cache-redux
- apollo-client-preset
- graphql
- graphql-anywhere
- graphql-tag
- isomorphic-unfetch
- next-routes
- prop-types
- react
- react-apollo
- react-dom
- redux
* [refactor] fix linting issues
When I run `yarn lint` explicitly these were caught, but not doing a
build proper. Apologies on that!
* [chore] 📦️ package.json: like other examples
* [refactor] +apollo-cache-inmemory, -apollo-cache-redux
Separation of Apollo and Redux. 😄️
We could stand to use a few actual examples of Redux, though this is a
good starting block.
Some other code cleanup as well.
* Always fetch pages with '.js' extention from client side.
* Load error page always from _error.js rather _error/index.js
* Load pages from page.js instead of page/index.js from the client for static exports.
* Update index.js
* Simplify the path re-write logic in the webpack pages-plugin.
* Pulled encoding to top of head (#3214)
* Remove next.d.ts to use @types/next (#3297)
* Add with-mobx-state-tree example (#3179)
* Adapt with-mobx example for with-mobx-state-tree
* Remove unnecessary lastUpdate parameter to show off snapshot
* update readme
* make other.js more closely mimic index.js
* Upgrade styled-jsx to v2.2.1
Includes some bug fixes.
* Fix linting
The serverState variable definition did not include the data node, which
may cause parsing errors on the client-side.
- add data: { } on line 23 within the apollo: { } object
* Adapt with-mobx example for with-mobx-state-tree
* Remove unnecessary lastUpdate parameter to show off snapshot
* update readme
* make other.js more closely mimic index.js
* Updated for Apollo 2.0
* Updated for commit: ccb188a
* Simplified serverState
Updated with danistefanovic's comment. Looks better.
* Revert "Simplified serverState"
This reverts commit 1b543a35909dcfe401c753cb2f71760180087057.
* Simplified server
Updated with Statedanistefanovic's comment.
getToken is now deprecated, you'll get the following message if using the previous code:
firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.
Prior to react-apollo 2.0 createNetworkInterface accepted the credentials option in {opt: {credentials: 'policy'}}. HttpLink accepts it as {credentials: 'policy'}.
This has never been working, we based our intl + locale lookups out of this example and found out when translations wasn't working on page transitions due to the fact that messages gets set to undefined because its trying to destruct in the incorrect level