Closed ardeora closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
CI is running/has finished running commands for commit 228e7ef49ce2ac7e597678d7037f10521a969d5a. 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
Sent with 💌 from NxCloud.
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 228e7ef49ce2ac7e597678d7037f10521a969d5a:
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 |
While writing documentation for
queryOptions
in solid-query, I noticed the implementation ofqueryOptions
API was incorrect.In the current implementation. The
queryOptions
function would take in a function that would return an object of typeQueryOptions
. This is unnecessary and can be simplified by just taking in an object of typeQueryOptions
.Current implementation:
There are a few issues with the current implementation:
QueryClient
methods. In this current approach, there is no type inference on methods likegetQueryData
,setQueryData
,fetchQuery
, etc.QueryClient
methods, it would be better to have the options as an object instead of a function that returns an object.Proposed implementation: