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

fix(vue-query): fix queryOptions return type #8305

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jiwlee97
Copy link

@jiwlee97 jiwlee97 commented Nov 19, 2024

I updated the return type of the queryOptions function with Vue's UnwrapRef.

[AS-IS]
image

[TO-BE]
image

close #7892

Copy link

nx-cloud bot commented Nov 25, 2024

☁️ Nx Cloud Report

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


🟥 Failed Commands
nx affected --targets=test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Nov 25, 2024

Open in Stackblitz

More templates

@tanstack/angular-query-devtools-experimental

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@8305

@tanstack/query-async-storage-persister

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

@tanstack/angular-query-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/vue-query

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query-devtools

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

commit: c4dcd3c

@DamianOsipiuk
Copy link
Contributor

I have tried that before, but it would not work.

  1. You can actually pass options as a ref, so this change would actually produce wrong types.
  2. It breaks type inference in other cases.

I have yet to find a proper fix for this.

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.

[vue-query] Type error: queryOptions return type only contains the queryKey and initialData properties
2 participants