* Update to capture server exceptions and more
- Adds test cases for several server and client-side exceptions
- Allows capturing more server-side exceptions by overriding _error.js and using Sentry.captureException() within
- Use @sentry/node on the server
- Rely on Next.js's React Error Boundary instead of creating our own in _app.js
* Update test notes
Found some differences while testing in production
* Remove accidental mount throw on test 8
* Add note about server-side source maps
* Linting fixes
Some users aren't aware they need to edit their custom server to support various HTTP Methods (e.g. POST for API Routes).
Instead, we should just handle all HTTP Methods out-of-the-box.
---
Closes#8237
* 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
## 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
* Remove prefetch from with-apollo-and-redux-saga example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from using-inferno example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-apollo-and-redux example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-apollo-auth example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-tailwindcss example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from with-graphql-hooks example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Remove prefetch from data-fetch example
Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
* Add package.json to with-zones example
So that create-next-app works.
* Update README – no need to run `yarn` / `npm i`
This example doesn't have any dependencies in its package.json,
everything is handled by running `now dev`.
* Provide default value for apolloState
* Use hooks api
* Fix formatting problems
* Use useRef hook
* Add simple comment about displayName
* Go with caret for react-hooks and react-ssr
* Created a new example for React Native web
- use the latest `react-native-web`
- remove unused `react-art`
- remove redundant `babel-plugin-module-resolver`
- remove unused `.babelrc`
- add missing `app.json` (standard in React Native)
- added example for rendering an `<a />`
- added header examples
* `yarn lint-fix`
* Add @apollo/react-hooks and @apollo/react-ssr
* Migrate react-apollo to @apollo/react-hooks and Query component
* Migrate direct client mutations to useMutation hook
* Disable submit button when submiting a new post
* Fix Show More button not updating when loading more entries
* All queries with uppercase name
* Remove react-apollo
* Update getDataFromTree links
* Fixed lint issues