Skip to content

fix(compat): preserve query error callback semantics - #1623

Merged
Akryum merged 1 commit into
vuejs:v5from
dominikklein:fix/compat-query-error-callbacks
Nov 5, 2026
Merged

Akryum merged 1 commit into
vuejs:v5from
dominikklein:fix/compat-query-error-callbacks

Conversation

@dominikklein

Copy link
Copy Markdown
Contributor

With the default errorPolicy: 'none', compat currently forwards failed query states to onResult. Besides reporting a failed refetch as a result, this makes compat useLazyQuery().load() resolve with undefined before onError can reject it.

Restore v4.2.2's error handling by skipping these states in compat onResult. The guard uses the observable query's effective error policy, so client defaults and query overrides are respected. Partial results for all and ignore still pass through; native v5 events are unchanged.

Confirmed the behavior difference against v4.2.2 + Apollo Client 3.13.9 for both network and GraphQL failures. The new tests cover failed refetches, successful retries, lazy-load rejection, policy precedence, and partial results: 12 cases fail before the fix, while the 4 partial-result controls already pass.

Validation: all 122 composable tests, composable typecheck/build, and repository lint pass.

@netlify

netlify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vue-apollo-5 ready!

Name Link
🔨 Latest commit cfde630
🔍 Latest deploy log https://app.netlify.com/projects/vue-apollo-5/deploys/6ae4fed274cfe84a27851f91
😎 Deploy Preview https://deploy-preview-1623--vue-apollo-5.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 your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vue/apollo-components@1623
npm i https://pkg.pr.new/@vue/apollo-composable@1623

commit: cfde630

@Akryum
Akryum merged commit 7b5bfdb into vuejs:v5 Nov 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants