ts-rest / ts-rest

RPC-like client, contract, and server implementation for a pure REST API
https://ts-rest.com
MIT License
2.11k stars 91 forks source link

feat: adopt useSuspenseQuery #609

Closed ChiefORZ closed 2 weeks ago

ChiefORZ commented 3 weeks ago

To provide a smoother transition to the v5 of @tanstack/query, we should expose the new methods useSuspenseQuery, useSuspenseQueries as well as useSuspenseInfiniteQuery. We will fall back to the v4 default way by passing { suspense: true } to the queryOptions.

This will be another push to get the stone rolling, because the new hydration/dehydration features are awesome.

changeset-bot[bot] commented 3 weeks ago

⚠️ No Changeset found

Latest commit: 544179228c35758bd6bdb2d34edc04186b787759

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 3 weeks ago

@ChiefORZ is attempting to deploy a commit to the ts-rest Team on Vercel.

A member of the Team first needs to authorize it.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
16.1% Duplication on New Code

See analysis details on SonarCloud

Gabrola commented 2 weeks ago

@ChiefORZ Thank you for the contribution! I will close this for now, as adding react-query v5 to the peerDependencies causes (and has previously caused) a lot of compatibility issues and causes package managers to inadvertently install v5. As a result, we cannot merge any v5 compatible code until we actually do the transition. Once we migrate and are ready to release ts-rest v4, I will re-open this PR. Thank you again!