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(svelte-query-persist-client): Svelte implementation of client persistence #5928

Merged
merged 19 commits into from
Sep 13, 2023

Conversation

aadito123
Copy link
Member

I only learned enough Svelte to write this package so please let me know if there's anything wrong. I migrated the React tests to Svelte and all the tests pass.

Also made changes to the base svelte-query package so that isRestoring is respected.

Only thing missing is the persistence across multiple QueryClients. It is there in the React and Solid implementations because they have reactive wrappers around the QueryClient whereas the Svelte one does not. Not sure if there is a way to make it reactive in this situation without some API changes.

Addresses #5463

@vercel
Copy link

vercel bot commented Aug 30, 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 Sep 13, 2023 7:40am

@nx-cloud
Copy link

nx-cloud bot commented Aug 30, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8d573d8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


🟥 Failed Commands
nx affected --targets=test:eslint,test:lib,test:types,test:build,test:bundle

Sent with 💌 from NxCloud.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 30, 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 8d573d8:

Sandbox Source
@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

@aadito123
Copy link
Member Author

aadito123 commented Aug 30, 2023

Pushed the formatting fix. The other test that failed was in the react-query package.

Edit: looks like the react-query package is fine and now the error is in the solid-query package.

@aadito123
Copy link
Member Author

hey @lachlancollins, do you think you could take a look at this?

Copy link
Member

@lachlancollins lachlancollins left a comment

Choose a reason for hiding this comment

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

Amazing work, thanks so much for working on this @aadito123 ! I've had a quick look and everything overall seems good, but I'll have a closer look shortly.

packages/svelte-query/src/context.ts Show resolved Hide resolved
Copy link
Member

@lachlancollins lachlancollins left a comment

Choose a reason for hiding this comment

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

Thanks so much for your contribution @aadito123 !

@lachlancollins lachlancollins merged commit 34ad882 into TanStack:beta Sep 13, 2023
8 of 9 checks passed
@frederikhors
Copy link
Contributor

Any docs @aadito123? Thank you very much for this!

@aadito123
Copy link
Member Author

@frederikhors Nothing right now but I would be happy to work on them. In the meantime, you can look at the test cases for usage examples.

@frederikhors
Copy link
Contributor

Thanks. I'll try it asap (I'm still on V4 for now).

@aadito123
Copy link
Member Author

@frederikhors Tag me on any issues.

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