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

feat(query-core): improve useInfiniteQuery error handling #7418

Merged
merged 4 commits into from
May 12, 2024

Conversation

jasongerbes
Copy link
Contributor

Fixes #7412

  • Add isFetchNextPageError and isFetchPreviousPageError.
  • Update isRefetchError to be consistent with isRefetching.
  • Update docs and type definitions for useInfiniteQuery.
  • Add unit tests.

Related #4465

Copy link

vercel bot commented May 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview May 12, 2024 1:52pm

Copy link

codesandbox-ci bot commented May 12, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d9a2c6d:

Sandbox Source
@tanstack/query-example-angular-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

Copy link

nx-cloud bot commented May 12, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d9a2c6d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

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

this is a great contribution, thank you 🙏

@codecov-commenter
Copy link

codecov-commenter commented May 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.22%. Comparing base (93674fe) to head (d9a2c6d).
Report is 135 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7418      +/-   ##
==========================================
- Coverage   41.42%   41.22%   -0.21%     
==========================================
  Files         184      182       -2     
  Lines        7331     7413      +82     
  Branches     1531     1558      +27     
==========================================
+ Hits         3037     3056      +19     
- Misses       3889     3945      +56     
- Partials      405      412       +7     
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental 86.69% <87.50%> (+0.23%) ⬆️
@tanstack/eslint-plugin-query 85.46% <100.00%> (+0.17%) ⬆️
@tanstack/query-async-storage-persister 43.85% <100.00%> (-5.35%) ⬇️
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods 0.00% <0.00%> (ø)
@tanstack/query-core 92.96% <93.19%> (-0.30%) ⬇️
@tanstack/query-devtools 3.92% <0.00%> (-0.02%) ⬇️
@tanstack/query-persist-client-core 57.73% <ø> (ø)
@tanstack/query-sync-storage-persister 82.50% <ø> (ø)
@tanstack/react-query 92.77% <ø> (ø)
@tanstack/react-query-devtools 10.71% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query 77.74% <ø> (-4.53%) ⬇️
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query 62.68% <ø> (ø)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <ø> (ø)
@tanstack/vue-query 71.04% <ø> (+0.23%) ⬆️
@tanstack/vue-query-devtools ∅ <ø> (∅)

@TkDodo TkDodo merged commit 8ce6642 into TanStack:main May 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useInfiniteQuery: Explicit error handling for fetchNextPage/fetchPreviousPage
3 participants