Skip to content

fix(experimental_createQueryPersister): return more utilities, rename persister #8062

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DamianOsipiuk
Copy link
Contributor

@DamianOsipiuk DamianOsipiuk commented Sep 16, 2024

Restructure plugin to expose more utilities useful in user-land.

Returned utilities:

  • persisterFn - main persister function that can be passed to useQuery
  • persistQueryByKey - persist query to persister storage. Ex call it just after setQueryData
  • retrieveQuery - retrieve one query from persister storage
  • persisterGc - gc pass for the persister storage to clean up unusable entries
  • persisterRestoreAll - restore are persisted queries from storage

TODO:

  • tests
Copy link

nx-cloud bot commented Sep 16, 2024

View your CI Pipeline Execution ↗ for commit aa5bf2c.

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

☁️ Nx Cloud last updated this comment at 2025-05-04 11:33:48 UTC

Copy link

pkg-pr-new bot commented Sep 16, 2024

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: aa5bf2c

@DamianOsipiuk DamianOsipiuk force-pushed the do/persister-client-set-get branch from 95dad65 to 33ff831 Compare December 6, 2024 21:39
@github-actions github-actions bot added documentation Improvements or additions to documentation package: react-query labels Dec 6, 2024
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 55.22388% with 30 lines in your changes missing coverage. Please review.

Project coverage is 77.29%. Comparing base (2121836) to head (aa5bf2c).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #8062       +/-   ##
===========================================
+ Coverage   44.50%   77.29%   +32.79%     
===========================================
  Files         204       37      -167     
  Lines        8148      674     -7474     
  Branches     1817      183     -1634     
===========================================
- Hits         3626      521     -3105     
+ Misses       4079      127     -3952     
+ Partials      443       26      -417     
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 60.83% <55.22%> (-12.64%) ⬇️
@tanstack/query-sync-storage-persister 84.61% <ø> (ø)
@tanstack/react-query 95.42% <ø> (ø)
@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 ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@DamianOsipiuk DamianOsipiuk force-pushed the do/persister-client-set-get branch from 33ff831 to e38342b Compare May 4, 2025 11:28
Copy link

github-actions bot commented May 4, 2025

Sizes for commit aa5bf2c:

Branch Bundle Size
Main
This PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant