Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use apollo onError in with-apollo example #25051

Merged
merged 19 commits into from
May 22, 2022
Merged

Conversation

fabienheureux
Copy link
Contributor

@fabienheureux fabienheureux commented May 12, 2021

Use Apollo onError in order to flag GraphQL errors in the next.js server logs in the with-apollo example
https://www.apollographql.com/docs/react/api/link/apollo-link-error/

Documentation / Examples

  • Make sure the linting passes

⚠️ I lazily created this PR from Github directly as I don't have a local build of next.js on my current machine.
If ever linting does not pass, I will update this later today (sorry for the noise).
EDIT: it does not, I will update this PR shortly.

Use Apollo onError in order to flag GraphQL errors in the next.js server logs 
https://www.apollographql.com/docs/react/api/link/apollo-link-error/
@ijjk ijjk added the examples Issue/PR related to examples label May 12, 2021
@fabienheureux fabienheureux changed the title Use apollo onError Use apollo onError in with-apollo example May 12, 2021
@fabienheureux
Copy link
Contributor Author

any chance this can be reviewed ?

@fabienheureux
Copy link
Contributor Author

fabienheureux commented Sep 9, 2021

@ijjk any chance I can get another approval from you or any code owner ?
Thanks !

@ijjk
Copy link
Member

ijjk commented Oct 26, 2021

Failing test suites

Commit: b339a17

test/development/acceptance/ReactRefreshRegression.test.ts

  • ReactRefreshRegression > can fast refresh a page with getServerSideProps
Expand output

● ReactRefreshRegression › can fast refresh a page with getServerSideProps

expect(received).toBe(expected) // Object.is equality

Expected: "Count: 1"
Received: "Count: 0"

  160 |         export default function Index() {
  161 |           const [count, setCount] = useState(0)
> 162 |           const increment = useCallback(() => setCount(c => c + 1), [setCount])
      |            ^
  163 |           return (
  164 |             <main>
  165 |               <p>{count}</p>

  at Object.<anonymous> (development/acceptance/ReactRefreshRegression.test.ts:162:12)

test/integration/create-next-app/index.test.js

  • create next app > should fall back to default template
Expand output

● create next app › should fall back to default template

thrown: "Exceeded timeout of 90000 ms for a test.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

  238 |   // stdin is piped instead of inherited on windows
  239 |   if (process.platform !== 'win32') {
> 240 |     it('should fall back to default template', async () => {
      |     ^
  241 |       await usingTempDir(async (cwd) => {
  242 |         const projectName = 'fail-example'
  243 |         const res = await run(

  at integration/create-next-app/index.test.js:240:5
  at Object.<anonymous> (integration/create-next-app/index.test.js:24:1)

# Conflicts:
#	examples/with-apollo/lib/apolloClient.js
@kodiakhq kodiakhq bot merged commit e04d293 into vercel:canary May 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants