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

feat: qwik-query package #6436

Closed
wants to merge 17 commits into from
Closed

Conversation

gioboa
Copy link

@gioboa gioboa commented Nov 24, 2023

This pull request adds Qwik adapter for TanStack Query.

I covered:

useQuery
useInfiniteQuery
userQueries
useIsFetching
useMutation
useIsMutating

It's draft because I need to cover these things

  • TypeScript types
  • Few tests
  • Basic examples

To avoid a huge PR with too many lines of code these tasks will be in future PRs

  • Docs and readme
  • More tests
  • More Examples

Copy link

vercel bot commented Nov 24, 2023

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 Dec 5, 2023 8:54am

Copy link

codesandbox-ci bot commented Nov 24, 2023

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

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

Copy link

nx-cloud bot commented Nov 27, 2023

☁️ Nx Cloud Report

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

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work 👏

some options typings are set to any, so I guess we need to figure this out before publishing it

examples/qwik/basic/package.json Show resolved Hide resolved
packages/qwik-query/package.json Outdated Show resolved Hide resolved
packages/qwik-query/package.json Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use vitest for all our other packages as test manager. Would it be possible to stick with that for qwik, too ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately with Vitest I have some problem with Qwik, Cypress works like a charm, but I understand your point of view.

Comment on lines +12 to +13
export { useMutation } from './useMutation'
export { useIsMutating } from './useIsMutating'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v5 has a new useMutationState hook that you might want to implement in qwik as well

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the queryOptions aren't exported from the src/index.ts file ?

packages/qwik-query/src/root.tsx Outdated Show resolved Hide resolved
packages/qwik-query/src/utils.ts Outdated Show resolved Hide resolved
@TkDodo
Copy link
Collaborator

TkDodo commented Nov 27, 2023

oh, you might also want to add an integration test:

https://github.com/TanStack/query/tree/83d71c307410933909dce1c7e5579c6e36747195/integrations

basically a minimal example where we run the test:bundle task, which is supposed to build packages with different bundlers to ensure our packages work with different frameworks / build tools

@gioboa
Copy link
Author

gioboa commented Nov 28, 2023

great work 👏

some options typings are set to any, so I guess we need to figure this out before publishing it

Yep, in fact I really would like an help to figure out the right types

@TkDodo
Copy link
Collaborator

TkDodo commented Dec 1, 2023

can you please update with main and fix the conflicts - we've release the angular adapter today 🎉

let me see if I can help with the types

@gradddev
Copy link

gradddev commented Dec 3, 2023

let me see if I can help with the types

I'm trying to help with that, but there's still a lot of work to be done: gioboa#1

@n8sabes
Copy link

n8sabes commented Jan 17, 2024

@gioboa, @TkDodo, et al.

This is FANTASTIC, great work, and very needed! Any idea when it might be ready to merge?

..sebastian

@gioboa
Copy link
Author

gioboa commented Jan 19, 2024

@gradddev is doing a great job on the right direction. I'm looking forward to seeing the integration finalised.

@oqx
Copy link

oqx commented Jan 31, 2024

Dude, I can't wait for this to release! I've been doing a weekly checkin since the last (now closed) PR. 🤣

@@ -7,4 +7,4 @@ packages:
- 'examples/svelte/*'
- 'examples/vue/*'
- '!examples/vue/2*'
- '!examples/vue/nuxt*'
- '!examples/vue/nuxt*'
Copy link
Contributor

@manudeli manudeli Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- '!examples/vue/nuxt*'
- '!examples/vue/nuxt*'

@gioboa
Copy link
Author

gioboa commented Mar 22, 2024

I don't have the energy to finalise this PR now. I'm thinking at this integration twice a week but it's not correct to keep a stale PR in the repository. So I close this PR for now, I'm more than happy to explain the current situation of the PR to new contributions. I'm so sorry. Cheers 😔

@gioboa gioboa closed this Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants