Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Don't callonError if errors are thrown inonCompleted#12174

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jerelmiller merged 5 commits intorelease-3.13fromjerel/issue-12008-onerror
Dec 6, 2024

Conversation

jerelmiller
Copy link
Member

Fixes#12008

Errors thrown inonCompleted as a result of an error thrown insideonCompleted exhibit two behaviors:

  • The error becomes theerrors property on the resolved value from the mutation
  • onError is also called with the error thrown fromonCompleted

This is a bit surprising behavior asonError is meant to handle errors from the mutation.

This PR moves the error handling from a.catch on the promise to the 2nd argument to.then so that errors thrown inonCompleted aren't handled the same way. This results in the mutation promise throwing that error instead and ensuresonError is not called as a result.

@svc-apollo-docs
Copy link

svc-apollo-docs commentedDec 5, 2024
edited
Loading

✅ Docs Preview Ready

No new or changed pages found.

@changeset-botchangeset-bot
Copy link

changeset-botbot commentedDec 5, 2024
edited
Loading

🦋 Changeset detected

Latest commit:fe8cd6f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@apollo/clientMinor

Not sure what this means?Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-newpkg.pr.new
Copy link

pkg-pr-newbot commentedDec 5, 2024
edited
Loading

npm i https://pkg.pr.new/@apollo/client@12174

commit:c7d6358

@netlifyNetlify
Copy link

netlifybot commentedDec 5, 2024

Deploy Preview forapollo-client-docs ready!

NameLink
🔨 Latest commit5904a06
🔍 Latest deploy loghttps://app.netlify.com/sites/apollo-client-docs/deploys/6751eff84bc8b400082d21b9
😎 Deploy Previewhttps://deploy-preview-12174--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedDec 5, 2024
edited
Loading

size-limit report 📦

PathSize
dist/apollo-client.min.cjs40.64 KB (-0.01% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs"50.02 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production)47.14 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js"36.14 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production)33.54 KB (0%)
import { ApolloProvider } from "dist/react/index.js"1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production)1.24 KB (0%)
import { useQuery } from "dist/react/index.js"5.21 KB (0%)
import { useQuery } from "dist/react/index.js" (production)4.29 KB (0%)
import { useLazyQuery } from "dist/react/index.js"5.7 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production)4.78 KB (0%)
import { useMutation } from "dist/react/index.js"3.62 KB (-0.09% 🔽)
import { useMutation } from "dist/react/index.js" (production)2.84 KB (-0.14% 🔽)
import { useSubscription } from "dist/react/index.js"4.42 KB (0%)
import { useSubscription } from "dist/react/index.js" (production)3.48 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js"5.51 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production)4.17 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js"5.01 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production)3.66 KB (0%)
import { useLoadableQuery } from "dist/react/index.js"5.09 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production)3.74 KB (0%)
import { useReadQuery } from "dist/react/index.js"3.41 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production)3.35 KB (0%)
import { useFragment } from "dist/react/index.js"2.36 KB (0%)
import { useFragment } from "dist/react/index.js" (production)2.31 KB (0%)

@jerelmillerjerelmillerforce-pushed thejerel/issue-12008-onerror branch froma260e06 to9a71fc8CompareDecember 5, 2024 18:26
@netlifyNetlify
Copy link

netlifybot commentedDec 5, 2024

Deploy Preview forapollo-client-docs ready!

NameLink
🔨 Latest commita260e06
🔍 Latest deploy loghttps://app.netlify.com/sites/apollo-client-docs/deploys/6751f039e389d3000803c7e5
😎 Deploy Previewhttps://deploy-preview-12174--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

@netlifyNetlify
Copy link

netlifybot commentedDec 5, 2024
edited
Loading

Deploy Preview forapollo-client-docs ready!

NameLink
🔨 Latest commitfe8cd6f
🔍 Latest deploy loghttps://app.netlify.com/sites/apollo-client-docs/deploys/6753262a42d6990008f53272
😎 Deploy Previewhttps://deploy-preview-12174--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

Copy link
Member

@phryneasphryneas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Generally in favor of this, but I'm not sure if this is a patch or should at least be part of a minor, since it does change behaviour considerably and people might not read patch notes.

@jerelmiller
Copy link
MemberAuthor

@phryneas I'd be happy to wait for a minor. I'd like to getuseSuspenseFragment out somewhat quickly anyways, so perhaps we can get this in a 3.13 release.

phryneas reacted with thumbs up emoji

@jerelmillerjerelmiller changed the base branch frommain torelease-3.13December 6, 2024 16:19
@jerelmillerjerelmillerforce-pushed thejerel/issue-12008-onerror branch from04296c1 toc7d6358CompareDecember 6, 2024 16:25
@jerelmillerjerelmiller merged commitba5cc33 intorelease-3.13Dec 6, 2024
37 checks passed
@jerelmillerjerelmiller deleted the jerel/issue-12008-onerror branchDecember 6, 2024 16:48
@github-actionsgithub-actionsbot mentioned this pull requestDec 6, 2024
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJan 6, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@phryneasphryneasphryneas approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[Question] Syntax Errors inonCompleted causesonError to occur
3 participants
@jerelmiller@svc-apollo-docs@phryneas

[8]ページ先頭

©2009-2025 Movatter.jp