query icon indicating copy to clipboard operation
query copied to clipboard

fix(experimental_createQueryPersister): return more utilities, rename persister

Open DamianOsipiuk opened this issue 1 year ago • 2 comments

TODO:

  • [ ] docs
  • [ ] tests
  • [ ] potential setup function to patch queryClient

DamianOsipiuk avatar Sep 16 '24 19:09 DamianOsipiuk

View your CI Pipeline Execution ↗ for commit ec6573e5c0f85e5c10c10d6ef72d6e0a83373bcc.

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 2m 45s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 55s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-13 21:37:54 UTC

nx-cloud[bot] avatar Sep 16 '24 19:09 nx-cloud[bot]

More templates

@tanstack/angular-query-devtools-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@8062
@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@8062
@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@8062
@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@8062
@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@8062
@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@8062
@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@8062
@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@8062
@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@8062
@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@8062
@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@8062
@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@8062
@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@8062
@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@8062
@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@8062
@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@8062
@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@8062
@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@8062
@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@8062
@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@8062
@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@8062

commit: ec6573e

pkg-pr-new[bot] avatar Sep 16 '24 20:09 pkg-pr-new[bot]

Codecov Report

Attention: Patch coverage is 92.53731% with 5 lines in your changes missing coverage. Please review.

Project coverage is 80.83%. Comparing base (c89c6a0) to head (ec6573e). Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #8062       +/-   ##
===========================================
+ Coverage   44.40%   80.83%   +36.42%     
===========================================
  Files         206       36      -170     
  Lines        8174      668     -7506     
  Branches     1822      182     -1640     
===========================================
- Hits         3630      540     -3090     
+ Misses       4100      111     -3989     
+ Partials      444       17      -427     
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental ∅ <ø> (∅)
@tanstack/eslint-plugin-query ∅ <ø> (∅)
@tanstack/query-async-storage-persister 43.85% <ø> (ø)
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods ∅ <ø> (∅)
@tanstack/query-core ∅ <ø> (∅)
@tanstack/query-devtools ∅ <ø> (∅)
@tanstack/query-persist-client-core 78.32% <92.53%> (+4.85%) :arrow_up:
@tanstack/query-sync-storage-persister 84.61% <ø> (ø)
@tanstack/query-test-utils ∅ <ø> (∅)
@tanstack/react-query 95.34% <ø> (ø)
@tanstack/react-query-devtools 10.00% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query ∅ <ø> (∅)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query ∅ <ø> (∅)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <ø> (ø)
@tanstack/vue-query ∅ <ø> (∅)
@tanstack/vue-query-devtools ∅ <ø> (∅)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 06 '24 21:12 codecov[bot]

Sizes for commit ec6573e5c0f85e5c10c10d6ef72d6e0a83373bcc:

Branch Bundle Size
Main
This PR

github-actions[bot] avatar May 04 '25 11:05 github-actions[bot]

@DamianOsipiuk thank you very much for this!

frederikhors avatar May 14 '25 08:05 frederikhors

does this close any of the open issues around createPersister ?

TkDodo avatar May 14 '25 10:05 TkDodo

does this close any of the open issues around createPersister ?

This should close https://github.com/TanStack/query/issues/6310.
It exposes utilities to do persistence on demand in user-land.
And if i recall correctly we decided that we do not want to put more code to make that work out-of-the-box into the core.

DamianOsipiuk avatar May 14 '25 11:05 DamianOsipiuk

yeah if we want more utilities, they should come from the persister package

TkDodo avatar May 14 '25 11:05 TkDodo