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

refactor(solid-query): Ensure correct type inference when using skipToken in createQueries #7221

Closed
wants to merge 2 commits into from

Conversation

gwansikk
Copy link
Contributor

@gwansikk gwansikk commented Apr 3, 2024

While writing test code for solid-query, I discovered that type inference fails when a skipToken is present, as shown in the attached photo below. Unlike react-query, it does not correctly infer types. I have made modifications to createQueries to ensure accurate type inference.

react-query solid-query
image image

Copy link

vercel bot commented Apr 3, 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 Apr 5, 2024 10:28am

Copy link

nx-cloud bot commented Apr 3, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 33e9413. 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 Apr 3, 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 33e9413:

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

@codecov-commenter
Copy link

Codecov Report

Merging #7221 (33e9413) into main (93674fe) will decrease coverage by 0.34%.
Report is 53 commits behind head on main.
The diff coverage is 100.00%.

❗ 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    #7221      +/-   ##
==========================================
- Coverage   41.42%   41.08%   -0.34%     
==========================================
  Files         184      183       -1     
  Lines        7331     7355      +24     
  Branches     1531     1534       +3     
==========================================
- Hits         3037     3022      -15     
- Misses       3889     3925      +36     
- Partials      405      408       +3     
Components Coverage Δ
@tanstack/angular-query-devtools-experimental ∅ <ø> (∅)
@tanstack/angular-query-experimental 86.46% <0.00%> (ø)
@tanstack/eslint-plugin-query 85.29% <100.00%> (ø)
@tanstack/query-async-storage-persister 49.20% <ø> (ø)
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods 0.00% <0.00%> (ø)
@tanstack/query-core 93.29% <95.12%> (+0.03%) ⬆️
@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% <100.00%> (ø)
@tanstack/react-query-devtools 10.71% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query 81.62% <54.54%> (-0.65%) ⬇️
@tanstack/solid-query-devtools ∅ <ø> (∅)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query 62.68% <100.00%> (ø)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client 100.00% <100.00%> (ø)
@tanstack/vue-query 71.04% <90.47%> (+0.23%) ⬆️
@tanstack/vue-query-devtools ∅ <ø> (∅)

@TkDodo
Copy link
Collaborator

TkDodo commented Apr 5, 2024

is this similar to:

?

@gwansikk gwansikk closed this Apr 6, 2024
@gwansikk gwansikk deleted the refactor/solid-query-types branch April 6, 2024 04:36
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.

None yet

3 participants