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

usePrefetchQuery type tests and docs #7592

Conversation

brunolopesr
Copy link
Contributor

Adds type tests and docs to #7582

Copy link

vercel bot commented Jun 19, 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 Jun 19, 2024 2:12pm

@github-actions github-actions bot added documentation Improvements or additions to documentation package: react-query labels Jun 19, 2024
Copy link

nx-cloud bot commented Jun 19, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2f9fc7b. 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

codesandbox-ci bot commented Jun 19, 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 2f9fc7b:

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

@brunolopesr brunolopesr changed the base branch from main to feature/use-prefetch-query June 19, 2024 08:33
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.03%. Comparing base (6010477) to head (ded8264).

Current head ded8264 differs from pull request most recent head 2f9fc7b

Please upload reports for the commit 2f9fc7b to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##           feature/use-prefetch-query    #7592      +/-   ##
==============================================================
- Coverage                       87.30%   86.03%   -1.27%     
==============================================================
  Files                              24       24              
  Lines                             315      315              
  Branches                           79       80       +1     
==============================================================
- Hits                              275      271       -4     
- Misses                             33       37       +4     
  Partials                            7        7              
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental ∅ <ø> (∅)
@tanstack/eslint-plugin-query ∅ <ø> (∅)
@tanstack/query-async-storage-persister ∅ <ø> (∅)
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods ∅ <ø> (∅)
@tanstack/query-core ∅ <ø> (∅)
@tanstack/query-devtools ∅ <ø> (∅)
@tanstack/query-persist-client-core ∅ <ø> (∅)
@tanstack/query-sync-storage-persister ∅ <ø> (∅)
@tanstack/react-query 92.93% <100.00%> (-1.49%) ⬇️
@tanstack/react-query-devtools 10.71% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query ∅ <ø> (∅)
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client ∅ <ø> (∅)
@tanstack/svelte-query ∅ <ø> (∅)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client ∅ <ø> (∅)
@tanstack/vue-query ∅ <ø> (∅)
@tanstack/vue-query-devtools ∅ <ø> (∅)

@brunolopesr brunolopesr requested a review from TkDodo June 19, 2024 13:43
@TkDodo TkDodo merged commit b5ef74d into TanStack:feature/use-prefetch-query Jun 19, 2024
6 checks passed
@brunolopesr brunolopesr deleted the feature/use-prefetch-query-docs branch June 24, 2024 15:33
TkDodo added a commit that referenced this pull request Jun 25, 2024
* feat: usePrefetchQuery

* refactor: switch to actual prefetching

* refactor: remove ensureInfiniteQueryData function

will do in a separate PR

* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery (#7586)

* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery

* chore: update tests to assert the alternative spy is not called

* chore: add some new tests

* chore: remove it.only whoops

* chore: call mockClear after fetching

* chore: improve waterfall test by asserting fallback calls instead of loading node query

* chore: improve code repetition

* chore: add some generics to helper functions

* usePrefetchQuery type tests and docs (#7592)

* chore: add type tests and docs

* chore: update hooks to use FetchQueryOptions and FetchInfiniteQueryOptions

* chore: update tests

* chore: update docs

* chore: remove .md extension from link

* chore: add unknown default value to TQueryFnData

* Apply suggestions from code review

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

* Apply suggestions from code review

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>

* chore: fix types in tests

* chore: add new tests (#7614)

* chore: add new tests

* Apply suggestions from code review

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

---------

Co-authored-by: Bruno Lopes <88719327+brunolopesr@users.noreply.github.com>
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation package: react-query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants