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

breaking(query): migrate to tanstack/query-core v4 & make QueryKey's type generic #1126

Merged
merged 15 commits into from
Jul 25, 2022

Conversation

liaoliao666
Copy link
Contributor

@liaoliao666 liaoliao666 commented Apr 28, 2022

BREAKING CHANGES:

  • It depends on @tanstack/query-core.
  • atomWithInfiniteQuery's refetch action has payload.

@vercel
Copy link

vercel bot commented Apr 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
jotai ✅ Ready (Inspect) Visit Preview Jul 25, 2022 at 0:38AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 28, 2022

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

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion!
This is the first comment. Will have another look after the fix.

src/query/atomWithInfiniteQuery.ts Show resolved Hide resolved
@dai-shi
Copy link
Member

dai-shi commented May 16, 2022

@aulneau is busy??

@aulneau
Copy link
Collaborator

aulneau commented May 16, 2022

@dai-shi my apologies -- been quite busy, I will try and run this locally this week and get a review in :) appreciate everyones patience 🙏

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

My second review while waiting a response from @aulneau .

src/query/atomWithInfiniteQuery.ts Show resolved Hide resolved
tests/query/atomWithInfiniteQuery.test.tsx Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/query/atomWithQuery.ts Outdated Show resolved Hide resolved
@dai-shi dai-shi changed the title feat: compatible with react query's beta & make QueryKey's type great fix(query): compatible with react query's v4 beta & make QueryKey's type great Jun 19, 2022
@dai-shi
Copy link
Member

dai-shi commented Jul 19, 2022

@liaoliao666 Hi, #1239 is merged. Can you make this to base on it?
I just noticed RQ v4 is released 15 hours ago.

@liaoliao666
Copy link
Contributor Author

@dai-shi done

@dai-shi
Copy link
Member

dai-shi commented Jul 19, 2022

I should have been clearer.
@liaoliao666 Can you merge main and make the diff minimal?

package.json Outdated Show resolved Hide resolved
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

The diff looks clean. Thanks.

src/query/atomWithInfiniteQuery.ts Outdated Show resolved Hide resolved
src/query/atomWithInfiniteQuery.ts Show resolved Hide resolved
src/query/atomWithInfiniteQuery.ts Outdated Show resolved Hide resolved
@dai-shi
Copy link
Member

dai-shi commented Jul 20, 2022

We also need to change the docs.

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

The code looks good. (I do worry about too complicated generic types though.)

The remaining is to make the doc to follow the change. You want to merge main before modifying the doc.

src/query/atomWithInfiniteQuery.ts Outdated Show resolved Hide resolved
@dai-shi dai-shi changed the title fix(query): compatible with react query's v4 beta & make QueryKey's type great feat(query): migrate to tanstack/query-core v4 & make QueryKey's type generic Jul 21, 2022
@dai-shi dai-shi added this to the v1.7.7 milestone Jul 25, 2022
@dai-shi dai-shi merged commit 2c76f8a into pmndrs:main Jul 25, 2022
@dai-shi dai-shi changed the title feat(query): migrate to tanstack/query-core v4 & make QueryKey's type generic breaking(query): migrate to tanstack/query-core v4 & make QueryKey's type generic Aug 5, 2022
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

3 participants