* Remove connectToDevTools in favour of better default
* Remove redirect code from client
* Simplify function
* Remove apollo-boost
This package is optimized for client usage only.
We actually never used it. We only usered its reexports.
More info:
https://www.apollographql.com/docs/react/v2.5/recipes/authentication/#header
* Remove stopPropagation
We actually don’t need it.
* Refactor getToken method
We want to show how to get the token.
This can be from a cookie or some other isomorph store.
We are not interested in the cookie abstraction in this example.
* Secure cookie
not perfect but better than before….
* Add ssr config option
This was documented but not implemented
* Fix getInitialProps in with-apollo example
The code before had two design flaws:
* When we skip WithApollo.getInitialProps we must hoist PageComponent.getInitialProps if it is present.
* We should expose the apolloClient to underlying PageComponent.getInitialProps contexts.
* Add abort check
* Add some comments
* Add client only example page
https://github.com/zeit/next.js/pull/8620#issuecomment-527870886
* Remove connectToDevTools setting in favor default config
7eaf4132cd/packages/apollo-client/src/ApolloClient.ts (L170-L173)
* Remove fetch check
This is done by https://www.npmjs.com/package/isomorphic-unfetch
* Remove apollo-boost
I am removing this package, because we never actually used it.
This is because we use the named export of apollo boost wich resolves to apollo-client.
This way we removed apollo-link-state, apollo-link-error
* Remove redirect code from the client
* Move apollo logic into one file
+ Use http-link from http boost
* Remove _app.js from with-apollo-auth example
* Covert other class components to functional components
* Use esm import instead of require
played around with that example and was wondering why it didn't work any more when having an `auth/login` page.
I hope this addition will spare someone else some confusion :)
* Remove inline styles in favor of styled-jsx
* Remove getInitialProps from app
Allow automatic static optimization
* Remove _document.js
We really don’t need it in this example
* Migrate Class to Function Components
* creates perf marks object constant
* updates clearmarks to only clear core marks
* adds test + fixes object constqnt reference
* hardcodes perf marks and removes constant
* adds test to check custom marks are not cleared
## Motivation
The code before this PR had serveral issues:
1. Context uses reference identity to determine when to re-render, there are some gotchas that could trigger unintentional renders in consumers when a provider’s parent re-renders.
https://reactjs.org/docs/context.html#caveats
2. `setState` should use the reducer pattern in this example to make sure clicks are not swallowed by react batch.
* Add more pages to the 'blog' zone
- New dynamic page `pages/blog/post/[id].js`
- `pages/blog.js` moved to `pages/blog/index.js`
* Update Now and Next configs to support both `now dev` and `next dev`
- Set `assetPrefix` dynamically to either `/blog` or `''`.
- Update package.json scripts for both 'home' and 'blog' apps, support `yarn dev` in both of them.
* Update example description in README
* Fix formatting issues
* Make `/static` assets work in the 'blog' app
* Add routing rule for `/blog/static` to now.json
* Shorten README
I reverted it back to the state of 233152ee17 and then updated it with info on recent changes of the `with-zones` example.
* Use `continue: true` in now.json
Applies suggestions from code review.
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Fix JSON formatting
* Add routing rule for `_next` and `static` folders
* Update README of with-zones example slightly
Applies suggestions from code review.
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Remove unnecessary "dest" from `now.json`
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* [with-firebase-authentication] remove deprecated warning
* [with-firebase-authentication] improve client and server credentials example
* [with-firebase-authentication] fix typo in the docs
* Simplify apollo setup
* Allow disabling of ssr in favor of automatic static optimization
- Converted Class to Function Component
- Added ssr config option
* Exclude @apollo/react-ssr from client bundle
* Remove WithApollo.getInitialProps from the client
* Remove displayName from production build
* Fix production switch
* Change export & fucntion naming
- Use named export
- Change function naming
* Warn if someone tries to use this HOC with _app.js
* Update dependencies
> Update dependencies
* Changes to make v3 work
> Use hook `useIntl` instead of HOC `injectIntl`
> Change use of class components
> Changes to dependencies
* Small changes
Small changes
* Remove _app from with-apollo example
This allows automatic static optimization for pages, that don’t need apollo.
* Rename with-apollo
Name should be same as hoc
* Adjust text to reflect latest changes
more info: 4321c469466160d13bcd52afa099385e84a112a0
* Replace worker-farm with jest-worker
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Remove semaphores on top of jest-worker, unwind
terser worker, and remove extra error log