TanStack / query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
https://tanstack.com/query
MIT License
42.76k stars 2.92k forks source link

feat(core): ensureInfiniteQueryData #8048

Closed TkDodo closed 2 months ago

nx-cloud[bot] commented 2 months ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 09763dd58ffc8ccd34dd7957d0e8caded81aaa5b. 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 2 targets - [`nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3`](https://cloud.nx.app/runs/KoeU2fzd7X?utm_source=pull-request&utm_medium=comment) - [`nx run-many --target=build --exclude=examples/** --exclude=integrations/**`](https://cloud.nx.app/runs/1pzFoHJRAT?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

More templates

- [@tanstack/query-example-angular-basic](https://pkg.pr.new/template/ef430b32-0cdc-4dd4-ab23-531fe6c8e4b2) - [@tanstack/query-example-angular-infinite-query-with-max-pages](https://pkg.pr.new/template/7221c8d7-0e25-483d-89eb-9c68469a16cc) - [@tanstack/query-example-angular-router](https://pkg.pr.new/template/b93fc8a8-0b61-4361-a457-b5637616a682) - [@tanstack/query-example-angular-simple](https://pkg.pr.new/template/e7fcdb35-8d74-4c70-9240-e1eb8fc61540) - [@tanstack/query-example-react-algolia](https://pkg.pr.new/template/84872b87-49e5-4390-9be6-8d27988daebe) - [@tanstack/query-example-react-auto-refetching](https://pkg.pr.new/template/bf5d504b-0bba-47ad-87aa-c88e4f893f53) - [@tanstack/query-example-react-basic](https://pkg.pr.new/template/99f8fd1d-8bf2-43d8-aadb-0ceb7bda2eff) - [@tanstack/query-example-react-basic-graphql-request](https://pkg.pr.new/template/8714ef03-8b0f-492b-b6fe-f425063b9e89) - [@tanstack/query-example-react-default-query-function](https://pkg.pr.new/template/1e42d570-b9af-4f94-9a2a-c35c1ddee466) - [@tanstack/query-example-react-devtools-panel](https://pkg.pr.new/template/3ca00c71-de7f-4a64-b4b2-20c3b5382f22) - [@tanstack/query-example-react-infinite-query-with-max-pages](https://pkg.pr.new/template/b916013c-b76f-401d-92a3-fbb71ed37df3) - [@tanstack/query-example-react-load-more-infinite-scroll](https://pkg.pr.new/template/db6aab20-da03-4aca-8c67-a9c122bf5a26) - [@tanstack/query-example-react-nextjs](https://pkg.pr.new/template/e5626324-b8a0-4f6e-a37a-15da9b5b52d6) - [@tanstack/query-example-react-nextjs-app-prefetching](https://pkg.pr.new/template/2e73e583-7401-463e-82d7-04aee4ba06ca) - [@tanstack/query-example-nextjs-suspense-streaming](https://pkg.pr.new/template/59cb136f-f92c-4d80-97bd-0a6eec5f10f1) - [@tanstack/query-example-react-offline](https://pkg.pr.new/template/98bf0cc0-5eba-4e7a-aa8a-ec120ca3939f) - [@tanstack/query-example-react-optimistic-updates-cache](https://pkg.pr.new/template/664c154c-29f9-4daf-883e-0171d41ddefe) - [@tanstack/query-example-react-optimistic-updates-ui](https://pkg.pr.new/template/0f3ebc2d-7a4e-49dc-8ee8-00d092fdbbfa) - [@tanstack/query-example-react-pagination](https://pkg.pr.new/template/3759f344-c6cf-45dc-a88a-13f25d928b5b) - [@tanstack/query-example-react-playground](https://pkg.pr.new/template/63088f79-3da6-499e-80df-e5214045b3a4) - [@tanstack/query-example-react-prefetching](https://pkg.pr.new/template/b376a4a4-7427-4d54-a261-83b7d37754c8) - [@tanstack/query-example-react-react-native](https://pkg.pr.new/template/8e0256ed-8213-4971-94ba-9bc12d7539dc) - [@tanstack/query-example-react-router](https://pkg.pr.new/template/53a25728-4a44-43b3-a81e-c7a97cd6801d) - [@tanstack/query-example-react-rick-morty](https://pkg.pr.new/template/9aa65642-34f3-4569-a85b-c83227f6af87) - [@tanstack/query-example-react-shadow-dom](https://pkg.pr.new/template/b0de6160-b93e-40d7-be4e-b8e4b05280d8) - [@tanstack/query-example-react-simple](https://pkg.pr.new/template/6f04dee8-f2ac-4293-af26-26cdbafb4466) - [@tanstack/query-example-react-star-wars](https://pkg.pr.new/template/68ff93fa-a388-4bc8-9fe5-8560106c8d7f) - [@tanstack/query-example-react-suspense](https://pkg.pr.new/template/4135b03f-87a5-4d80-ac69-ce693b027fca) - [@tanstack/query-example-solid-astro](https://pkg.pr.new/template/aeb39887-666c-4aa6-aab2-8a195a0cd5bc) - [@tanstack/query-example-solid-basic](https://pkg.pr.new/template/158b3552-471c-47a6-955d-2caf22f3d97b) - [@tanstack/query-example-solid-basic-graphql-request](https://pkg.pr.new/template/cd0b3303-8c53-43f1-a5d1-810598d7171e) - [@tanstack/query-example-solid-simple](https://pkg.pr.new/template/286b26fc-36d7-4285-b2ee-4b2877eb3956) - [@tanstack/query-example-solid-start-streaming](https://pkg.pr.new/template/e588af6e-1e59-418b-8a03-8b000cc92279) - [@tanstack/query-example-svelte-auto-refetching](https://pkg.pr.new/template/87a0e042-be5f-49ba-848e-3f48aead5976) - [@tanstack/query-example-svelte-basic](https://pkg.pr.new/template/773d8dc5-8761-4f33-9ec5-f77f4e30da11) - [@tanstack/query-example-svelte-load-more-infinite-scroll](https://pkg.pr.new/template/cc9131d1-ce46-43e6-8611-5232aaca0374) - [@tanstack/query-example-svelte-optimistic-updates](https://pkg.pr.new/template/25c928ca-2899-44d0-92cd-a069460a90f5) - [@tanstack/query-example-svelte-playground](https://pkg.pr.new/template/d2380203-659c-4e36-9b1f-4804ed0dc944) - [@tanstack/query-example-svelte-simple](https://pkg.pr.new/template/072d8d10-9147-48fe-90f1-29b5a7ff1a9d) - [@tanstack/query-example-svelte-ssr](https://pkg.pr.new/template/2a448f51-f49b-4086-8c51-f06df60a4b03) - [@tanstack/query-example-svelte-star-wars](https://pkg.pr.new/template/8b9a6ab1-9a36-4ea5-a12c-10bb272deaa1) - [@tanstack/query-example-vue-2.6-basic](https://pkg.pr.new/template/4973f0e3-85e4-493b-aa64-694fde9e22a8) - [@tanstack/query-example-vue-2.7-basic](https://pkg.pr.new/template/4d71d21d-4d79-48c6-9723-b2bc40f2a332) - [@tanstack/query-example-vue-basic](https://pkg.pr.new/template/c20a591d-0cdd-4ddd-9e4a-6d253f9777e3) - [@tanstack/query-example-vue-nuxt3](https://pkg.pr.new/template/8334f83a-05f5-439c-9431-c40095d006ce) - [@tanstack/query-example-vue-dependent-queries](https://pkg.pr.new/template/4a5728a1-7618-4275-ba5a-91917c0feaad) - [@tanstack/query-example-vue-simple](https://pkg.pr.new/template/42e7a816-9c53-4ca3-b0d0-ff60f3113fb5) - [@tanstack/query-example-vue-persister](https://pkg.pr.new/template/935a717f-0861-4dd3-8632-cde182aa13f4) - [@tanstack/query-example-solid-default-query-function](https://pkg.pr.new/template/be473512-8e49-4cbb-8d9d-9f03d5127080)

@tanstack/angular-query-devtools-experimental

``` pnpm add https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@8048 ```

@tanstack/angular-query-experimental

``` pnpm add https://pkg.pr.new/@tanstack/angular-query-experimental@8048 ```

@tanstack/eslint-plugin-query

``` pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-query@8048 ```

@tanstack/query-broadcast-client-experimental

``` pnpm add https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@8048 ```

@tanstack/query-async-storage-persister

``` pnpm add https://pkg.pr.new/@tanstack/query-async-storage-persister@8048 ```

@tanstack/query-core

``` pnpm add https://pkg.pr.new/@tanstack/query-core@8048 ```

@tanstack/query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/query-devtools@8048 ```

@tanstack/query-persist-client-core

``` pnpm add https://pkg.pr.new/@tanstack/query-persist-client-core@8048 ```

@tanstack/query-sync-storage-persister

``` pnpm add https://pkg.pr.new/@tanstack/query-sync-storage-persister@8048 ```

@tanstack/react-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/react-query-devtools@8048 ```

@tanstack/react-query

``` pnpm add https://pkg.pr.new/@tanstack/react-query@8048 ```

@tanstack/react-query-next-experimental

``` pnpm add https://pkg.pr.new/@tanstack/react-query-next-experimental@8048 ```

@tanstack/react-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/react-query-persist-client@8048 ```

@tanstack/solid-query

``` pnpm add https://pkg.pr.new/@tanstack/solid-query@8048 ```

@tanstack/solid-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/solid-query-devtools@8048 ```

@tanstack/solid-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/solid-query-persist-client@8048 ```

@tanstack/svelte-query

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query@8048 ```

@tanstack/svelte-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query-devtools@8048 ```

@tanstack/vue-query

``` pnpm add https://pkg.pr.new/@tanstack/vue-query@8048 ```

@tanstack/svelte-query-persist-client

``` pnpm add https://pkg.pr.new/@tanstack/svelte-query-persist-client@8048 ```

@tanstack/vue-query-devtools

``` pnpm add https://pkg.pr.new/@tanstack/vue-query-devtools@8048 ```

commit: 09763dd

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.84%. Comparing base (9608f80) to head (09763dd). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/TanStack/query/pull/8048/graphs/tree.svg?width=650&height=150&src=pr&token=jqEbswkEDQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack)](https://app.codecov.io/gh/TanStack/query/pull/8048?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) ```diff @@ Coverage Diff @@ ## main #8048 +/- ## ========================================= + Coverage 0 61.84% +61.84% ========================================= Files 0 135 +135 Lines 0 4681 +4681 Branches 0 1306 +1306 ========================================= + Hits 0 2895 +2895 - Misses 0 1544 +1544 - Partials 0 242 +242 ``` | [Components](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | Coverage Δ | | |---|---|---| | [@tanstack/angular-query-devtools-experimental](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/angular-query-experimental](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `86.58% <ø> (∅)` | | | [@tanstack/eslint-plugin-query](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-async-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `43.85% <ø> (∅)` | | | [@tanstack/query-broadcast-client-experimental](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-codemods](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/query-core](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `92.80% <100.00%> (∅)` | | | [@tanstack/query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `4.86% <ø> (∅)` | | | [@tanstack/query-persist-client-core](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `57.73% <ø> (∅)` | | | [@tanstack/query-sync-storage-persister](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `82.50% <ø> (∅)` | | | [@tanstack/react-query](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `92.50% <ø> (∅)` | | | [@tanstack/react-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `10.00% <ø> (∅)` | | | [@tanstack/react-query-next-experimental](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/react-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `100.00% <ø> (∅)` | | | [@tanstack/solid-query](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `78.20% <ø> (∅)` | | | [@tanstack/solid-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/solid-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `100.00% <ø> (∅)` | | | [@tanstack/svelte-query](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `87.33% <ø> (∅)` | | | [@tanstack/svelte-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | | | [@tanstack/svelte-query-persist-client](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `100.00% <ø> (∅)` | | | [@tanstack/vue-query](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `71.51% <ø> (∅)` | | | [@tanstack/vue-query-devtools](https://app.codecov.io/gh/TanStack/query/pull/8048/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TanStack) | `∅ <ø> (∅)` | |